You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you feed .convert_form() a ModelForm, it will likely seem to hang if the ModelForm contains any ModelChoiceField and there is a significant amount of data in the queryset of those fields. Recommending explicit treatment of ModelChoiceField in .convert_formfield() so that you get either type is whatever type the model's pk is (usually integer) or possibly a url (or both); Model._meta.pk tells you what field this is.
to get a model form from a model, use modelform_factory() from django.forms
I'll try to make a PR at some point
The text was updated successfully, but these errors were encountered:
If you feed
.convert_form()
aModelForm
, it will likely seem to hang if theModelForm
contains anyModelChoiceField
and there is a significant amount of data in thequeryset
of those fields. Recommending explicit treatment ofModelChoiceField
in.convert_formfield()
so that you get either type is whatever type the model'spk
is (usually integer) or possibly a url (or both);Model._meta.pk
tells you what field this is.to get a model form from a model, use
modelform_factory()
fromdjango.forms
I'll try to make a PR at some point
The text was updated successfully, but these errors were encountered: