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

Popular posts from this blog

Multilayer CSV to filtered excel -

Listboxes in c# -

ios - Why must I define variables twice in the Header file? -