WebFaction
Community site: login faq

Hello, I need help on this to setup admin. I follow the screencast from yoursite. and i got this error: my admin should be at xxxxxx.webfactional.com/crossmap/admin. How can I set the root to xxxxx.webfactional.com/crossmap?

No module named admin.site.urls

Request Method:     GET
Request URL:    http://xxxxxx.webfactional.com/admin/
Django Version:     1.3.1
Exception Type:     ImportError
Exception Value:

No module named admin.site.urls

Exception Location:     /home/xxxxxx/webapps/crossmap/lib/python2.7/django/utils/importlib.py in import_module, line 35
Python Executable:  /usr/local/bin/python
Python Version:     2.7.1
Python Path:

['/home/xxxxxx/webapps/crossmap',
 '/home/xxxxxx/webapps/crossmap/lib/python2.7',
 '/usr/local/lib/python27.zip',
 '/usr/local/lib/python2.7',
 '/usr/local/lib/python2.7/plat-linux2',
 '/usr/local/lib/python2.7/lib-tk',
 '/usr/local/lib/python2.7/lib-old',
 '/usr/local/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/site-packages',
 '/usr/local/lib/python2.7/site-packages/PIL']

asked 01 Mar '12, 10:32

jubileelewis
329
accept rate: 0%

edited 01 Mar '12, 20:39

ryans ♦♦
5.0k103660


Instructions for serving a Django app on a URL path below the root are available in our documentation: Mounting a Django Application on a Subpath.

You're seeing that error message because, without following those instructions, your "crossmap" app thinks it's running on the root. You have a second Django app running on the root that doesn't have admin enabled, and that's what is actually throwing the error.

Hope that helps!

permanent link

answered 01 Mar '12, 11:18

seanf
12.2k42136
accept rate: 37%

it is still not working, my crossmap is under webapp not under django, so my crossmap will be like this /home/jubileelewis/webapps/crossmap

(01 Mar '12, 11:58) jubileelewis

Aha, it looks like you haven't completely enabled the Django admin site.

To do so, edit your urls.py and change this...

# from django.contrib import admin
# admin.autodiscover()

... to this ...

from django.contrib import admin
admin.autodiscover()

... and then restart your Apache.

(01 Mar '12, 12:18) seanf

it is still not working when I go to the site, not admin site, it gives me this error

Using the URLconf defined in myproject.urls, Django tried these URL patterns, in this order:

^admin/doc/
^admin/

The current URL, , didn't match any of these.

(01 Mar '12, 14:29) jubileelewis

to go there this is the site http://crossmap.jubileelewis.webfactional.com/ and for admin http://crossmap.jubileelewis.webfactional.com/admin i make the crossmap sub to go to /crossmap

(01 Mar '12, 14:31) jubileelewis

when I take out all the admin acces, the site is working well, just the admin is not function

(01 Mar '12, 15:07) jubileelewis

Looks like you've gotten it working (site loads for us). Typically the "URL didn't match" error suggests an issue in the URLconf (urls.py) file.

(01 Mar '12, 20:41) ryans ♦♦
showing 5 of 6 show 1 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×40
×15

question asked: 01 Mar '12, 10:32

question was seen: 5,427 times

last updated: 01 Mar '12, 20:41

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM