#16637: Admin site gives DoesNoteExist at /admin/
-------------------------------+--------------------------------------
     Reporter:  camey@…        |                    Owner:  nobody
         Type:  Bug            |                   Status:  reopened
    Component:  Documentation  |                  Version:  1.4
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  1              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by Bill Ellis):

 * status:  closed => reopened
 * version:  1.3 => 1.4
 * resolution:  invalid =>


Comment:

 This caught me out too.

 In 1.4, default INSTALLED_APPS includes django.contrib.sites.
 If we do syncdb, this sql is executed:
 {{{
 a$ python manage.py sqlall sites
 BEGIN;
 CREATE TABLE `django_site` (
     `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
     `domain` varchar(100) NOT NULL,
     `name` varchar(50) NOT NULL
 )
 ;
 COMMIT;
 }}}

 Note that the table is empty. If following the polls tutorial (like I was
 doing) the presence of this empty table leads to the "DoesNoteExist at
 /admin/".

 There are loads of fixes/workarounds ; chuck some data into the table, use
 the one liner above, comment out "django.contrib.sites" before the first
 syncdb -- but for new folk like me, this was a bit confusing, and not easy
 to google.


 Perhaps, for 1.4 documentation, adjust the polls tutorial to tell user to
 comment out "django.contrib.sites" before the first syncdb.
 Perhaps, for next version, don't have "django.contrib.sites" as a default
 / or get it to have nicer syncdb behaviour.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16637#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en.

Reply via email to