Hi Kabads,
you need to add "django.contrib.admin" to your installed apps in
settings:
E.g.:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
)
Afterwards you should run "python manage.py syncdb" again. This will
prompt you to create a superuser.
Cheers,
Ben
On May 9, 8:25 am, Kabads <[EMAIL PROTECTED]> wrote:
> I'm using SVN django (checked out a couple of days ago) to work my way
> through the new DJango book. Chapter six of the book details how to
> create the admin interface. I've followed the steps through and ran
> python manage.py syncdb. According to the chapter I should have been
> prompted for a super user, but I wasn't.
>
> I saw in another post on this NG that I should run
> python manage.py shell
>
> >>>from django.contrib.auth.create_superuser import createsuperuser
> >>>createsuperuser()
>
> but I still get error:
>
> >>> createsuperuser()
>
> Traceback (most recent call last):
> File "<console>", line 1, in ?
> File "/usr/lib/python2.4/site-packages/django/contrib/auth/
> create_superuser.py", line 31, in createsuperuser
> User.objects.get(username=default_username)
> File "/usr/lib/python2.4/site-packages/django/db/models/manager.py",
> line 73, in get
> return self.get_query_set().get(*args, **kwargs)
> File "/usr/lib/python2.4/site-packages/django/db/models/query.py",
> line 250, in get
> obj_list = list(clone)
> File "/usr/lib/python2.4/site-packages/django/db/models/query.py",
> line 108, in __iter__
> return iter(self._get_data())
> File "/usr/lib/python2.4/site-packages/django/db/models/query.py",
> line 470, in _get_data
> self._result_cache = list(self.iterator())
> File "/usr/lib/python2.4/site-packages/django/db/models/query.py",
> line 183, in iterator
> cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "")
> + ",".join(select) + sql, params)
> File "/usr/lib/python2.4/site-packages/django/db/backends/util.py",
> line 12, in execute
> return self.cursor.execute(sql, params)
> File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line
> 163, in execute
> self.errorhandler(self, exc, value)
> File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line
> 35, in defaulterrorhandler
> raise errorclass, errorvalue
> ProgrammingError: (1146, "Table 'mysite.auth_user' doesn't exist")
>
> Where have I gone wrong (for the learning process) and what can I do
> to fix it?
>
> Thanks in advance.
> Adam
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---