No module named admin.site.urls

385 views
Skip to first unread message

atik

unread,
Apr 3, 2009, 4:13:45 PM4/3/09
to Django users
hi! I am new to dijango and i have the tutorial of official release is
helping me. while part 1 of the tutorial is done nicely, but when i
have tried to part 2, that is Activate the admin site, i have be
getting hard time. It is telling me No module named admin.site.urls. I
have configured urls.py like this-

from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
# Example:
# (r'^mysite/', include('mysite.foo.urls')),

# Uncomment the admin/doc line below and add
'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)

And it is in the directory My documents->mysite. I have getting error
in the line
(r'^admin/', include(admin.site.urls)),
What can i do? Please help me.

Alex Gaynor

unread,
Apr 3, 2009, 4:41:48 PM4/3/09
to django...@googlegroups.com
what version of Django are you running?  If you're using 1.0.X you should 1.0.X docs, not the development version docs.

Alex

--
"I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire
"The people's good is the highest law."--Cicero

Rosemarie Loewe

unread,
Apr 3, 2009, 4:59:49 PM4/3/09
to django...@googlegroups.com

Hi Alex,

 

I had the same problem, it must be an error in tutorial. Following works:

 

(r'^admin/', include(admin.site.root)),

 

 

Best Regards

Rosemarie

 


Rosemarie Loewe

unread,
Apr 3, 2009, 5:02:04 PM4/3/09
to django...@googlegroups.com
Hi Atik,

I had the same problem, it must be an error in tutorial. Following works:

(r'^admin/', include(admin.site.root)),


Best Regards

Rosemarie


-----Ursprüngliche Nachricht-----
Auftrag von atik
Gesendet: Freitag, 3. April 2009 22:14
An: Django users
Betreff: No module named admin.site.urls

Alex Gaynor

unread,
Apr 3, 2009, 5:12:49 PM4/3/09
to django...@googlegroups.com
Including admin.site.root will emphatically not work.  That's conflating the method for using the admin urls from 1.1-dev and 1.0.  Follow the documentation for your appropriate version(they're both available at docs.djangoproject.com).

atik

unread,
Apr 3, 2009, 9:13:15 PM4/3/09
to Django users
Thanks both of you.
@Rosemarie
It doesn't work.
@Alex
I use the latest stable version 1.0.2. Plz do something so i can do it
successfully.
I have trying this tutorial
http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02
And problem is with "Active Admin Panel".
Plz help.

Alex Gaynor

unread,
Apr 3, 2009, 9:15:00 PM4/3/09
to django...@googlegroups.com
As the top of that page clearly says that documentation is for the development version, you need to use the 1.0 docs: http://docs.djangoproject.com/en/1.0/intro/tutorial02/

atik

unread,
Apr 3, 2009, 9:42:33 PM4/3/09
to Django users
Thanks.
That works.
Reply all
Reply to author
Forward
0 new messages