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

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -