Hi Karen, Thanks!
On Mar 27, 6:12 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, Mar 27, 2008 at 6:45 PM, Francisco Benavides < > > > > [EMAIL PROTECTED]> wrote: > > > Hi, > > > I am in the process of adding more information to the user, managed > > via django.contrib.auth. I am getting an error in the admin > > interface, when trying to add a profile to a given user. First time > > the interface crashes, but the profile gets added, so the next time I > > try to add the same profile, it naturally complains that it already > > exists. > > > I have setup the AUTH_PROFILE_MODULE = 'txm.userprofile' > > settings.py > >http://dpaste.com/41684/ > > > The profile is using user = models.ForeignKey(User, unique=True, > > related_name='profile') > > userprofile.model.py > >http://dpaste.com/41685/ > > > url.py > >http://dpaste.com/41686/ > > > The DEBUG data is in: > >http://dpaste.com/41688/ > > > Thx!/Fco > > Traceback shows the admin code is trying to log information about the new > object created. Ultimate error is in force_unicode and from the line above > you can see force_unicode is being called on 'new_object', so that's > probably an instance of your UserProfile model. Checking its __unicode__ > method shows the problem: > > return '%i %s %s %s' % (self.user.first_name, self.user.last_name, self. > materno, self.user.username) > > It's trying to format self.user.first_name (a string, I'd guess) as a %i > (integer). I think that %i should be %s. > > Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---