As this other SO post shows, my Django 1.4 directory structure globally looks like:
wsgi/
champis/
settings.py
settings_deployment.py
urls.py
site/
static/
css/
app.css
templates/some_app/foo.html
__init__.py
urls.py
views.py
models.py
manage.py
The project is champis, the app is site. My PYTHONPATH includes the wsgi folder (well from Django standards it should be named after the project i.e. champis, but here I'm starting from an Openshift django-example Git project).
My champis.urls:
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^champis/', include('site.urls')),
url(r'^admin/', include(admin.site.urls)),
)
My site.urls module then routes to specific pages, but when trying to access on local, I have the error:
http://127.0.0.1/champis => no module name site.urls
The site app is present in my INSTALLED_APPS, and my ROOT_URLCONF is champis.urls.
Do you have an idea why ? Even moving the site folder into the champis one didn't help.