RFC 44: Make "Custom models" the default
Hey, finally got the chance to read this and 100% agree that this would be helpful and enable a lot of future improvements over time.
I have also put up an issue on the main repo to add some fields to the image/document models that would be really useful https://github.com/wagtail/wagtail/issues/5658.
Finally, I did some analysis of about 78 different document/image models I found on Github projects. This will give a bit of an indicator of the kinds of changes made by developers.
https://docs.google.com/spreadsheets/d/1JgrDb5s_ugAnL04r3GOBqh5DodZodqqp3rqrN1sTKpE/edit?usp=sharing
The top ten fields added in custom models are:
- 16 x caption
probably because it is in the docs - 12 x credit
- 11 x alt / alt_text
yes, I know we are not adding this and I agree but just FYI - 9 x description / details / summary
- 7 x author
- 7 x source / source_name
- 5 x source_url / external_url
- 4 x attribution
- 4 x file
- 4 x licence / license
- 3 x copyright_year / year
We discussed this as a croe team meeting so I think this is at least stage 2
Any chance of a custom Page model :)
@rgs258 😄 can you say more?
@thibaudcolas I can elavorate. It would be amazing to have a Swappable Page model, like the user model, so we can add custom fields and other stuff to the base page. Right now we have to fork wagtail and add changes to the base page there. We can't add a "additonal" model via foreign key for performance and other reasons.
So to have the a custom page model by default, that can inherit from a "AbstractBasePage" would be amazing. Wagtail could work with the AbstractBasePage and people could add whatever they need to their Page Model.
We briefly discussed this RFC again during the core team meeting today. This RFC needs answers to the remaining comments by Thibaud and we can move this to final comment period after. Keen to see this become the default 👍
@kaedroho would you be okay with me taking over this RFC? Or would you rather implement it yourself.