#21007 closed New feature (invalid)
Support for add new fields on proxy model inheritance
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
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 |
Description
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 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
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.
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.