Hi all,

Currently when you want a model to be edited from a custom modelform, you
need to make use of that new modelform manually in your create/update views
and admin.

Would it be possible to add a new overridable method in the model to
generate a default modelform ?

Then, default create/update views (including admin's) could detect if a
model has such a method and call it to get the modelform instead of going
through the default factory.

For example:

class YourModel(models.Model):
    def get_form_class(self):
        return YourModelForm

Thanks in advance for your feedback

Have a great day

-- 
∞

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAC6Op1_e-065up%2Bs5mz7d%3D%3Dcxmz7w5coE0cMswfUpgOh3eRRjw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to