python - ModelForm to edit a model and its OneToOne-related model -
say have user model , account model.
the account related user onetoone relationship.
i have modelform user model, , i'm looking third-party plugin / patch / snippet allow declaration:
class usereditform(modelform): class meta: model = user fields = ['first_name', 'last_name', 'email', 'account__phone'] note account__phone part.
thanks!
Comments
Post a Comment