django-autocomplete-light icon indicating copy to clipboard operation
django-autocomplete-light copied to clipboard

#1333 clone forwards

Open ercpe opened this issue 1 year ago • 1 comments

When Django creates a Form instance from a form class, the fields and widgets are copied instead of instantiated. This means that every field/widget must implement deepcopy properly to create clones of any references it holds.

Implement __deepcopy__ in the WidgetMixin and copy the forward list to prevent forwards from leaking into unrelated forms when using a common base class.

ercpe avatar Mar 23 '24 05:03 ercpe