name 'admin' is not defined

2,976 views
Skip to first unread message

Weber Sites

unread,
Sep 2, 2008, 1:56:20 PM9/2/08
to django...@googlegroups.com
Hi

I'm trying to follow the Tutorial02 and once i uncomment the admin
lines in urls.py i get :

ImproperlyConfigured at /mysite/
Error while importing URLconf 'mysite.urls': name 'admin' is not defined

berber

Ronny Haryanto

unread,
Sep 2, 2008, 2:15:13 PM9/2/08
to django...@googlegroups.com

This probably sounds silly, but since you don't give any code snippets
then I can't be sure. Have you uncommented the import line:

from django.contrib import admin

in urls.py?

Ronny

James Matthews

unread,
Sep 2, 2008, 2:38:57 PM9/2/08
to django...@googlegroups.com
Also uncomment the admin.autodiscover() line. (If you are holding a svn version)

Nevio Vesic

unread,
Oct 18, 2012, 8:29:18 AM10/18/12
to django...@googlegroups.com, ber...@weber-sites.com
There is a 'django.contrib.admin', under INSTALLED_APPS ( settings.py ) that must be enabled as well!

After that I'd suggest to run `python manage.py syncdb`

Best regards,
Nevio
Reply all
Reply to author
Forward
0 new messages