I was suggesting in your project you subclass the ModelFormMetaclass, use it in your own subclass of ModelForm, and use that everywhere in your project.
Fatpage is an imaginary fork of flatpages that adds create and edit views > There are a lot of problems out there with imaginary third party apps that you want to modify the internals of :) Often it's not hard to get third party apps to add some hook for extension (e.g. their own setting, or signal, ...) or to fork it yourself - easier than modifying Django core. On Thursday, December 22, 2016 at 9:59:48 PM UTC, is_null wrote: > > Absolutely ! If we don't want to monkey patch, we can use the other step: > 4. get control on the flatpage form in the admin: > https://gist.github.com/Kub-AT/3676137 > > Then, there's the fatpages use case. Fatpage is an imaginary fork of > flatpages that adds create and edit views. In this case, we also need the > following steps: > > 5. Subclass Fatpage views somewhere in our project so that it uses our > forms > > 6. Override the create/edit urls to use our new views. > > In the fatpages case, the proposal removes the cost of 1. 3. 4. 5. 6. and > cuts the cost of 2. by making it DRY-friendly. > > About ModelFormMetaclass: are you suggesting to move the signal in > ModelFormMetaclass or do you have a lot more ambition ie. add new APIs ? > > [0] > https://github.com/yourlabs/django-autocomplete-light/blob/v2/autocomplete_light/forms.py > > [1] https://github.com/jpic/xmodelform/blob/master/README.rst > > -- 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/db7bf37c-016a-41b2-9a56-d1ccee427a81%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.