On Mar 23, 2011, at 4:25 AM, Malcolm Box wrote: > Further investigation: looks like it's a South/syncdb interaction. The > UserProfile will be created by the south migration, but of course that > hasn't run when the auth post_install runs to prompt for a superuser. > > Sadly syncdb --migrate doesn't do the right thing either. > > For now, I'm just creating a superuser manually using ./manage.py > shell, but would welcome any ideas on how to solve this better. >
Don't create the super user during syncdb, you user profile table will not exist. You must have a create signal on admin that creates a user profile, this looks like it is failing The procedure you wan to use to initialize the database is: manage.py syncdb --noinput manage.py migrate mange.py createsuperuser Jason > Malcolm > > On Mar 23, 10:11 am, Malcolm Box <[email protected]> wrote: >> Hi, >> >> I'm running into an error when doing a syncb on a clean DB during the >> installation of the auth system. >> >> I get the normal prompt "You just installed Django's auth system, >> which means you don't have any superusers defined. Would you like to >> create one now? (yes/no):" and answer yes. >> >> But when the user is created, I get a django.db.utils.DatabaseError: >> (1146, "Table 'x.x_userprofile' doesn't exist"), because the >> userprofile table from my app hasn't been created yet. >> >> This must be a common problem, but I can't find a recommendation on >> how to deal with it. What's the right thing to do? >> >> Thanks, >> >> Malcolm > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > 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. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. 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.

