Link to home
Avatar of xoxomos

asked on

Python No Modules Named Defaults

Still trying to follow the example:
I get to step 17 then more problems:

ImportError at /admin/
No module named defaults
Request Method:       GET
Request URL:       http://localhost:8000/admin/
Django Version:       1.8.5
Exception Type:       ImportError
Exception Value:       

No module named defaults

Exception Location:       /Users/ctaylor/mysite/mysite/ in <module>, line 1
Python Executable:       /usr/bin/python
Python Version:       2.7.10
Python Path: module after edit:
A206394:mysite ctaylor$ cat
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
urlpatterns = patterns(r'^mysite/', include(''),

# 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(,
) before edit:


Any idea how i messed up on the editing?
Avatar of Mark Brady
Mark Brady
Flag of United States of America image

It is missing the admin class from django.contrib
Try going to the django file (module and search for contrib then look for admin. It may be a corrupt file in which case you would need to re-install it or it could be commented out perhaps. Anyway, just my 2 cents worth.
Avatar of xoxomos


Does this have anything to do with what i'm looking for?

A206394:admin ctaylor$ pwd
A206394:admin ctaylor$ ls -ltr
total 352
-rw-r--r--@  1 ctaylor  staff  12061 Feb 20  2013
-rw-r--r--@  1 ctaylor  staff  19088 Feb 20  2013
-rw-r--r--@  1 ctaylor  staff  12852 Feb 20  2013
-rw-r--r--@  1 ctaylor  staff  17393 Feb 20  2013
-rw-r--r--@  1 ctaylor  staff  58288 Feb 20  2013
-rw-r--r--@  1 ctaylor  staff   2207 Feb 20  2013
-rw-r--r--@  1 ctaylor  staff  13361 Feb 20  2013
-rw-r--r--@  1 ctaylor  staff   1914 Feb 20  2013
-rw-r--r--@  1 ctaylor  staff  12482 Feb 20  2013
-rw-r--r--@  1 ctaylor  staff   3285 Feb 20  2013
-rw-r--r--@  1 ctaylor  staff   1608 Feb 20  2013
drwxr-xr-x@  4 ctaylor  staff    136 Feb 20  2013 templates
drwxr-xr-x@  5 ctaylor  staff    170 Feb 20  2013 media
drwxr-xr-x@ 68 ctaylor  staff   2312 Feb 20  2013 locale
drwxr-xr-x@  5 ctaylor  staff    170 Feb 20  2013 views
drwxr-xr-x@  7 ctaylor  staff    238 Feb 20  2013 templatetags
A206394:admin ctaylor$
Yikes I don't know what that is sorry.
Avatar of xoxomos


OK Thanks.  I'll be going to OOW next week so it's possible someone there knows who prepared that tutorial.
awesome. Sorry I couldn't help further.
Avatar of xoxomos

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of xoxomos


Simply deleting would be acceptable also.  Just did it this way to show what my solution was.