On Sun, Jun 29, 2008 at 4:44 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Sun, Jun 29, 2008 at 11:27 AM, AdamC <[EMAIL PROTECTED]> wrote: >> >> I have a couple of models whereby the admin interface is throwing up >> some errors when I try add details to the user profile. >> >> Each user will have a points score and belong to a team, which will >> aggregate all the scores of those users belonging to that team. >> <snip>
> Your UserProfile __str__ function is returning a User object, not a string. > It needs to return a string, since it is called to produce a string > representation of your Model. If you want to return the string > representation of the associated user, return str(self.user). > >> >> The score is an integer, but it seems that the template is expecting a >> string, when I definitely don't want it to be a string. > > The error you have posted has nothing to do with score. > Thanks Karen. The user profile part works a treat now, until I implement the team foreign key on the user profile. Then I get the error: OperationalError at /admin/tables/userprofile/ no such column: tables_userprofile.team_id on the admin part of the user profile. Now I understand the error, but it doesn't make sense as it *should* exist. Again, any help is appreciated. Adam -- You back your data up on the same planet? http://www.monkeez.org PGP key: 0x7111B833 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---