Re: Django Tutorial

129 views
Skip to first unread message

TJ Max

unread,
Sep 8, 2012, 10:07:13 PM9/8/12
to django...@googlegroups.com
Please tell us what your urls.py is

On Sat, Sep 8, 2012 at 6:02 PM, David Perez <david.per...@gmail.com> wrote:
Hi,

I am new to Django, I am actually starting its tutorial. On part 2 it enables the admin site, but I can't log in to it. The following error comes up (see at the bottom):

If I remember correctly I did not get prompt to create a superuser when I wrote python manage.py syncdb, so I am not sure if I do not have a superuser. I tried to create it with python manage.py createsuperuser --username=david but it is not working.

I am most certain it is something simple...and I tried to follow the steps as exact as I could. I appreciate your help
David


DoesNotExist at /admin/

Site matching query does not exist.
Request Method:GET
Request URL:http://127.0.0.1:8000/admin/
Django Version:1.4.1
Exception Type: DoesNotExist
Exception Value:

Site matching query does not exist.
Exception Location: /Library/Python/2.7/site-packages/django/db/models/query.py in get, line 366
Python Executable: /usr/bin/python
Python Version: 2.7.1
Python Path:

['/Users/Dperezc/Desktop/Estudios independientes/Django/Proyecto1_Poll',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
 '/Library/Python/2.7/site-packages']
Server time: Sat, 8 Sep 2012 18:45:28 -0600




--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/YzfZzN7HgtoJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Babatunde Akinyanmi

unread,
Sep 9, 2012, 8:50:59 AM9/9/12
to django...@googlegroups.com
Have you uncommented the url pattern that activates the admin site?

On 9/9/12, TJ Max <timothy...@gmail.com> wrote:
> Please tell us what your urls.py is
>
> On Sat, Sep 8, 2012 at 6:02 PM, David Perez
> <david.per...@gmail.com>wrote:
>
>> Hi,
>>
>> I am new to Django, I am actually starting its tutorial. On part 2 it
>> enables the admin site, but I can't log in to it. The following error
>> comes
>> up (see at the bottom):
>>
>> If I remember correctly I did not get prompt to create a superuser when I
>> wrote *python manage.py syncdb*, so I am not sure if I do not have a
>> superuser. I tried to create it with *python manage.py createsuperuser
>> --username=david* but it is not working.
>>
>> I am most certain it is something simple...and I tried to follow the
>> steps
>> as exact as I could. I appreciate your help
>> David
>>
>>
>> DoesNotExist at /admin/
>>
>> Site matching query does not exist.
>>
>> Request Method:GET Request URL:http://127.0.0.1:8000/admin/ Django
>> Version:1.4.1Exception Type: DoesNotExistException Value:
>>
>>
>> Site matching query does not exist.
>>
>> Exception
>> Location:/Library/Python/2.7/site-packages/django/db/models/query.py in
>> get, line 366Python
>> Executable: /usr/bin/pythonPython Version: 2.7.1Python Path:
--
Sent from my mobile device

Bob Cochran

unread,
Sep 9, 2012, 9:55:38 AM9/9/12
to django...@googlegroups.com, David Perez
On 09/08/2012 09:02 PM, David Perez wrote:
If I remember correctly I did not get prompt to create a superuser when I wrote python manage.py syncdb, so I am not sure if I do not have a superuser.

You can check your user table manually:

    > python manage.py dbshell

    mysql> select * from auth_user;

or

    mysql> select * from auth_user where is_superuser=1;



Jon Blake

unread,
Sep 10, 2012, 2:34:41 AM9/10/12
to django...@googlegroups.com
Hi David, you might have stumbled over a problem I had when I first tried out the tutorial a week ago. I'm using an Oracle database back end, and on my first try of python manage.py syncdb, I also missed the prompt to create a superuser account. The problem was finally identified as a missing privilege for my identified database account. After granting missing privileges, and starting again, everything was fine.

What back end database are you using? Is dictionary DATABASES in settings.py correctly edited for your installed database and user account? Does the account have required privileges to create objects in your account's schema?

HTH, Jon


On Sunday, September 9, 2012 11:02:14 AM UTC+10, David Perez wrote:
Hi,

I am new to Django, I am actually starting its tutorial. On part 2 it enables the admin site, but I can't log in to it. The following error comes up (see at the bottom):

If I remember correctly I did not get prompt to create a superuser when I wrote python manage.py syncdb, so I am not sure if I do not have a superuser. I tried to create it with python manage.py createsuperuser --username=david but it is not working.

I am most certain it is something simple...and I tried to follow the steps as exact as I could. I appreciate your help.

David


DoesNotExist at /admin/

Site matching query does not exist.
Request Method:GET
Request URL:http://127.0.0.1:8000/admin/
Django Version:1.4.1
Exception Type:DoesNotExist
Exception Value:
Site matching query does not exist.
Exception Location:
/Library/Python/2.7/site-packages/django/db/models/query.py in get, line 366
Python Executable:/usr/bin/python
Python Version:2.7.1

maha

unread,
Sep 13, 2012, 3:46:38 AM9/13/12
to django...@googlegroups.com
Tell us what the urls.py and settings.py.
Have you uncomment the line django.admin.site in settings.py
Reply all
Reply to author
Forward
0 new messages