Django admin list_editable profile
In Django, I made a UserProfile class and linked it to the User with user = models.OneToOneField(User)
That works fine, looks like this:
Where the UserProfile is visible (with only one field).
However, I am also using the list_editable option that I discovered today. I can get the User fields editable in list view, like this:
Very nice feature, but one I can find little information about.
What I want to do is add UserProfile fields to this list in an editable way (the email_verified field in the above example, to begin with).
Is that possible to do (without changing Django code)? If so, how would I do that?
Many thanks,
UPDATE: Seriously, how can I make the question more useful if I can't use links, images, nothing? Information about list_editable is in the Django h开发者_StackOverflow中文版elp, hopefully Google helps.
You can use inheritance of User model and get rid from Profile. In my opinion this is better way. Here you can read about this: http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/
And then just add email_verified to list_editable
精彩评论