Opened 11 years ago

Closed 11 years ago

#20896 closed Uncategorized (worksforme)

Missing a step in "Activate the admin site"

Reported by: Earl Ruby <eruby@…> Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords: Admin, DoesNotExist
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

If you use Django 1.4.5 and follow the steps on https://docs.djangoproject.com/en/1.4/intro/tutorial02/ to "Activate the admin site" you'll get a "DoesNotExist at /admin/" error page.

With a new installation, the django_site table is empty. It needs at least one record or the admin site will fail with the "DoesNotExist at /admin/" error page. To fix the problem:

python manage.py shell

from django.contrib.sites.models import Site
Site.objects.create(pk=1, domain='YourDomainName', name='YourName')

Please update the https://docs.djangoproject.com/en/1.4/intro/tutorial02/ with this info.

Change History (1)

comment:1 by Tim Graham, 11 years ago

Resolution: worksforme
Status: newclosed

An entry for "example.com" should be created automatically when you run syncdb. You may have made a mistake following the instructions.

Note: See TracTickets for help on using tickets.
Back to Top