jonashaag / django-addanother

"Add another" buttons outside the Django admin
http://django-addanother.readthedocs.org/
ISC License
50 stars 18 forks source link

Widget state shared between form instances #41

Closed jonashaag closed 4 years ago

jonashaag commented 4 years ago

Two bugs here:

1) We should be using deepcopy to make copies of the inner widget to avoid state sharing of inner widgets if someone passes a widget instance rather than a widget class. https://github.com/django/django/commit/09da1e79de5a03a63610822bd4e5fc2adcbeb38a

2) We should make sure that when a widget is being copied using deepcopy, the inner widget is deepcopied too.

jonashaag commented 4 years ago

We actually don't need 1., see Django's MultiWidget implementation