OneToOne fields in ModelForm
|Reported by:||mccartney||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently there's no support for OneToOne fields in ModelForms.
- If this is by design, then it should be mentioned in the docs
- Otherwise it should be implemented...
I test it running:
from django.forms.models import model_to_dict myModelInstance = ModelClass() myModelInstance.subEntity = SubEntity() dikt = model_to_dict(myModelInstance())
One would expect dikt['subEntity'] to be a dictionary containing SubEntity() fields, not some id.
The ticket is related to #8015