Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#18308 closed Bug (invalid)

Tutorial needs "disable django.contrib.sites' instruction

Reported by: esnolte@… Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


If you're running Django 1.4 and follow the online tutorial (presumably a tutorial for 1.4), you'll encounter the following error when you try to access the admin site ( in part 2:

DoesNotExist at /admin/
Site matching query does not exist.

The fix is to comment out the "django.contrib.sites" line in INSTALLED_APPS in

So part 2 should read:

  • Uncomment "django.contrib.admin" in the INSTALLED_APPS setting.
  • Comment "django.contrib.sites" in the INSTALLED_APPS setting.
  • Run python syncdb. Since you ...

Change History (3)

comment:1 Changed 7 years ago by Karen Tracey

Resolution: invalid
Status: newclosed

It's not necessary to disable sites to get the tutorial to work properly, there is something else going on with the sequence of events here that is causing the problem. I don't know exactly what sequence of events would lead to the default site being missing, but I did just run through the tutorial following the instructions, with 1.4, and did not see this problem.

comment:2 Changed 7 years ago by anonymous

Interesting. I experience this on Django (1, 4, 0, 'final', 0) as installed by MacPorts' py27-django package with MacPorts' Python 2.7.3 and a sqlite3 database. What environment was the tutorial tested in? A Linux or Windows environment? I can try and replicate the problem to help narrow down the cause.

comment:3 Changed 7 years ago by Aymeric Augustin

This is a duplicate of #18226, please continue the discussion over there.

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