xoxomos
asked on
Python No Modules Named Defaults
Still trying to follow the example:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/OOW11/python_django/python_django.htm
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/mysi te/urls.py in <module>, line 1
Python Executable: /usr/bin/python
Python Version: 2.7.10
Python Path:
urls.py module after edit:
A206394:mysite ctaylor$ cat urls.py
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(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.ad mindocs.ur ls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)
urls.py before edit:
['/Users/ctaylor/mysite',
'/Library/Python/2.7/site- packages/w eb.py-0.37 -py2.7.egg ',
'/Library/Python/2.7/site- packages/p ip-7.1.2-p y2.7.egg',
'/System/Library/Framework s/Python.f ramework/V ersions/2. 7/lib/pyth on27.zip',
Any idea how i messed up on the editing?
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/OOW11/python_django/python_django.htm
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/mysi
Python Executable: /usr/bin/python
Python Version: 2.7.10
Python Path:
urls.py module after edit:
A206394:mysite ctaylor$ cat urls.py
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(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.ad
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)
urls.py before edit:
['/Users/ctaylor/mysite',
'/Library/Python/2.7/site-
'/Library/Python/2.7/site-
'/System/Library/Framework
Any idea how i messed up on the editing?
ASKER
Does this have anything to do with what i'm looking for?
A206394:admin ctaylor$ pwd
/Users/ctaylor/Django-1.3. 7/django/c ontrib/adm in
A206394:admin ctaylor$ ls -ltr
total 352
-rw-r--r--@ 1 ctaylor staff 12061 Feb 20 2013 widgets.py
-rw-r--r--@ 1 ctaylor staff 19088 Feb 20 2013 validation.py
-rw-r--r--@ 1 ctaylor staff 12852 Feb 20 2013 util.py
-rw-r--r--@ 1 ctaylor staff 17393 Feb 20 2013 sites.py
-rw-r--r--@ 1 ctaylor staff 58288 Feb 20 2013 options.py
-rw-r--r--@ 1 ctaylor staff 2207 Feb 20 2013 models.py
-rw-r--r--@ 1 ctaylor staff 13361 Feb 20 2013 helpers.py
-rw-r--r--@ 1 ctaylor staff 1914 Feb 20 2013 forms.py
-rw-r--r--@ 1 ctaylor staff 12482 Feb 20 2013 filterspecs.py
-rw-r--r--@ 1 ctaylor staff 3285 Feb 20 2013 actions.py
-rw-r--r--@ 1 ctaylor staff 1608 Feb 20 2013 __init__.py
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$
A206394:admin ctaylor$ pwd
/Users/ctaylor/Django-1.3.
A206394:admin ctaylor$ ls -ltr
total 352
-rw-r--r--@ 1 ctaylor staff 12061 Feb 20 2013 widgets.py
-rw-r--r--@ 1 ctaylor staff 19088 Feb 20 2013 validation.py
-rw-r--r--@ 1 ctaylor staff 12852 Feb 20 2013 util.py
-rw-r--r--@ 1 ctaylor staff 17393 Feb 20 2013 sites.py
-rw-r--r--@ 1 ctaylor staff 58288 Feb 20 2013 options.py
-rw-r--r--@ 1 ctaylor staff 2207 Feb 20 2013 models.py
-rw-r--r--@ 1 ctaylor staff 13361 Feb 20 2013 helpers.py
-rw-r--r--@ 1 ctaylor staff 1914 Feb 20 2013 forms.py
-rw-r--r--@ 1 ctaylor staff 12482 Feb 20 2013 filterspecs.py
-rw-r--r--@ 1 ctaylor staff 3285 Feb 20 2013 actions.py
-rw-r--r--@ 1 ctaylor staff 1608 Feb 20 2013 __init__.py
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.
ASKER
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Simply deleting would be acceptable also. Just did it this way to show what my solution was.
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.