JDavies
JDavies

Reputation: 2770

No module named pages.urls

I'm trying to install Django Gerbi-CMS and getting no luck. I've got through the installation a couple of times and not getting anywhere. When I run the server I get the error:

No module named pages.urls

When I install it tells me that it's installed correctly. However I look in the python2.7/site-packages and pages is not in there.

I installed on an existing site a while ago and I can't see what different other than pages and the other depencencies not showing in the above directory.

The last command I ran to install the package was:

$ sudo pip install django-page-cms 

which like I said installed but nothing showing up in my site-packages.

Link to site - http://packages.python.org/django-page-cms/installation.html

SETTINGS:

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.admin',
    'django.contrib.admindocs',
    #'authority',
    'pages',
    'south',
    'blog',
)

URLs:

if settings.DEBUG:
urlpatterns += patterns('',
    # Trick for Django to support static files (security hole: only for Dev environement! remove this on Prod!!!)
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    url(r'^admin_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.ADMIN_MEDIA_ROOT}),
)
 urlpatterns += patterns('',      
(r'^', include('pages.urls')),
)

If you need any other info please let me know.

Thanks!

Upvotes: 0

Views: 2373

Answers (2)

JDavies
JDavies

Reputation: 2770

After going through the installtion process several times I worked out that because I was using 'sudo' it was installing on the server and not inside the virtualenv!

So when you install the app you need to Install it without sudo, otherwise it will install outside of the virtualenv!

Upvotes: 1

Prateek
Prateek

Reputation: 1556

Did you included the application in your settings.py file in the section called

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.admin',
    'django.contrib.sites',
    'mptt',
    'tagging',
    'pages',      # You have to include it here      
)

Upvotes: 0

Related Questions