On Sun, Jun 29, 2008 at 12:05 PM, AdamC <[EMAIL PROTECTED]> wrote: > > 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. >
You apparently ran syncdb for your models when the team ForeignKey in UserProfile was commented out. Therefore the userprofile table in the database was created without the column to track this ForeignKey (team_id). You need to either manually add the column to your database so that it matches what you now have in your Django model, or do a manage.py reset of the application (which will delete any existing data in your tables). 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 -~----------~----~----~----~------~----~------~--~---