Jeremy Osterhouse wrote: > Yes, you missed something, but you aren't the first! If you have > django.contrib.auth in your INSTALLED_APPS (should be there by default, > I think), and ran manage.py syncdb, then it should have prompted you > for a superuser account username and password. > > If you did that, but don't remember what you put in, you could create a > new superuser from the shell (python manage.py shell): > from django.contrib.auth.models import User > me = User.create_user("learner404","[EMAIL PROTECTED]","password")
Thanks both for your very quick answer. the import statement worked fine but not the create_user: AttributeError: type object 'User' has no attribute 'create_user' I've also looked in the doc which says: --- Just run this command: python /path/to/django/contrib/auth/create_superuser.py --- but if I do it I have: EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined. I also did a new "mysite2" hoping that django will maybe asked for a new "super user" for this site but it wasn't the case either. Not sure what to do next. > me.is_super_user = True > me.save() > > Pretty new to Django myself, but I think that should do the trick. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---