Redirects unknown URLs to the default application

It's bad form to show the user a Page Not Found on
the first site open, so we redirect to the default
application.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
This commit is contained in:
Alexandru DAMIAN 2013-03-07 13:59:08 +02:00 committed by Paul Eggleton
parent af499c0d99
commit b483dcf2af

View File

@ -6,7 +6,7 @@
# All rights reserved.
from django.conf.urls.defaults import patterns, include, url
from django.views.defaults import page_not_found
from django.views.generic.simple import redirect_to
from django.contrib import admin
admin.autodiscover()
@ -16,6 +16,6 @@ urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('registration.urls')),
url(r'^captcha/', include('captcha.urls')),
url(r'.*', page_not_found)
url(r'.*', redirect_to, {'url' : '/layerindex/'})
)