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
In https://github.com/ella/django-appdata/blob/master/app_data/forms.py#L248 a model_form is created from standard modelform_factory, but sometimes you'd want to provide a custom ModelForm.
Adding a model_form argument and generating the model form only if empty, would allow this.
I can provide a PR for this
The text was updated successfully, but these errors were encountered:
I originally envisioned people would just use the **kwargs part that we pass to the factory that can contain a form which will then be used as a superclass for the generated ModelForm (inside modelform_factory) but that is probably too complicated in some cases.
Have I really been so dumb?
Obviously the form kwargs works nicely!
I reworded the title, as probably it'd be useful to document how to do this (even if it's standard Django stuff)
yakky
changed the title
Allow using custom ModelForm
Document how to use custom ModelForm
Jan 3, 2015
In https://github.com/ella/django-appdata/blob/master/app_data/forms.py#L248 a
model_form
is created from standardmodelform_factory
, but sometimes you'd want to provide a customModelForm
.Adding a
model_form
argument and generating the model form only if empty, would allow this.I can provide a PR for this
The text was updated successfully, but these errors were encountered: