Opened 13 years ago

Closed 13 years ago

Last modified 13 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

Description

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 (http://127.0.0.1:8000/admin/) 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 settings.py.

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 manage.py syncdb. Since you ...

Change History (3)

comment:1 by Karen Tracey, 13 years ago

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 by anonymous, 13 years ago

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 by Aymeric Augustin, 13 years ago

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

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