Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#21007 closed New feature (invalid)

Support for add new fields on proxy model inheritance

Reported by: alexandreld@… Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Support for add new fields on proxy model inheritance could simplify the apps extensibility, and will improve one more OOP feature to Django ORM.

Change History (2)

comment:1 Changed 5 years ago by Carl Meyer

Resolution: invalid
Status: newclosed

Hi; thanks for submitting this feature request. I don't understand the feature you are requesting, though. Django does support adding new fields on non-proxy inherited models, but the point of proxy model inheritance is that there is no additional database table for the proxy model, it's purely a Python-level subclass. So where would the data for these added fields be stored? If you want to add fields to your subclass, use regular (concrete) model inheritance, not proxy inheritance.

Feel free to reopen if you can clarify how the requested feature would work, and how "proxy model inheritance with support for adding new fields" would be different from normal (non-proxy) model inheritance.

comment:2 Changed 5 years ago by Marc Tamlyn

I think the real feature the OP is looking for is generic swappable models. This will probably happen some day, but I think we're still ironing out some things with the swappable User model before that can become a public API.

Note: See TracTickets for help on using tickets.
Back to Top