Opened 16 years ago

Closed 16 years ago

#7681 closed (invalid)

Updating user (from auth model) in admin does not create nor update UserProfile

Reported by: conchas Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have created a UserProfile to extend the User from Auth model, and when I try to edit a UserProfile inline in User edit view I see a message saying that the user was updated succefully, but the UserProfile is neither updated (when it's already created) nor created. I can create and update the UserProfiles from admin but not inline in the User edit view.

This issue is also mentioned at http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/#c3395

This is my code:

models.py:

class UserProfile(models.Model):
    user = models.ForeignKey(User, unique=True, edit_inline=models.TABULAR, num_in_admin=1,min_num_in_admin=1, max_num_in_admin=1, num_extra_on_change=0, core=True)
    home_address = models.TextField(core=True)

settings.py:

AUTH_PROFILE_MODULE = 'myapp.UserProfile'

Change History (1)

comment:1 by Eric Holscher, 16 years ago

Resolution: invalid
Status: newclosed

You need to update your user profile module in the save() method.

Note: See TracTickets for help on using tickets.
Back to Top