Code

Opened 2 years ago

Closed 2 years ago

Last modified 2 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 ...

Attachments (0)

Change History (3)

comment:1 Changed 2 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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 2 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 2 years ago by aaugustin

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.