Models virtual fields and ModelForms
|Reported by:||loic84||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.3|
|Cc:||ognajd@…, James Pic||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Problem: ModelForms do not expose models virtual fields.
In case of models composite fields that are managed by a single virtual field it would be useful to be able to supply a form field in ModelForms.
Currently the only virtual field in Django is GenericForeignKey and it doesn't need this feature because each local field it relies on is responsible for its own data. However it would be a great addition for 3rd parties composite fields where the virtual field would need to supply a form field, process the submitted value and then populate local fields for final storage.
Change History (5)
comment:1 Changed 5 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|