This is a Django site, migrated to Dotcloud through this documentation. I have an issue with my URLs: I cannot access my admin part, and the root URL that is not supposed to be matched matches ! Let me explain in detail:
root/
|- settings.py
|- urls.py
|- champis/
|- urls.py
File root/urls.py
:
urlpatterns = patterns('',
(r'^champis/', include('champis.urls')),
(r'^admin/$', include(admin.site.urls)),
)
File root/champis/urls.py
:
urlpatterns = patterns('champis.views',
url(r'^$', 'index'),
url(r'^recherche/$', 'search'),
url(r'^glossaire/$', 'glossary'),
url(r'^glossaire/(?P<letter>\w)/$', 'glossary'),
url(r'^(?P<champi_name>\w+)/$', 'detail'),
url(r'^(?P<champi_name>\w+)/(?P<photo_nb>\d+)/$', 'detail'),
)
So I should find my admin site at http://server.com/admin
, and my application at http://server.com/champis
, but this is not the case:
http://server.com/admin
andhttp://server.com/champis
trigger a 404- but my applications is served at
http://server.com
!
It looks like as if the champis
part of the URL was automatically and magically added to the root URL... Do you have an explanation ? Thanks !
EDIT: extract of my settings.py
:
ROOT_URLCONF = 'urls'
Django version is 1.4, and actually DEBUG
is set to True
.