summaryrefslogtreecommitdiff
path: root/chimere/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/urls.py')
-rw-r--r--chimere/urls.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/chimere/urls.py b/chimere/urls.py
index aa95921..164ef68 100644
--- a/chimere/urls.py
+++ b/chimere/urls.py
@@ -20,6 +20,7 @@
from django.conf import settings
from django.conf.urls.defaults import *
from django.contrib import admin
+from django.core.exceptions import ImproperlyConfigured
admin.autodiscover()
from chimere.models import Area
@@ -51,7 +52,12 @@ if settings.CHIMERE_FEEDS:
LatestPOIsByZoneID(), name='feeds-areaid'),
)
-if settings.CHIMERE_ENABLE_ROUTING:
+if hasattr(settings, 'CHIMERE_ENABLE_ROUTING') \
+ and settings.CHIMERE_ENABLE_ROUTING:
+ if not hasattr(settings, 'CHIMERE_ROUTING_TRANSPORT') \
+ or not settings.CHIMERE_ROUTING_TRANSPORT:
+ raise ImproperlyConfigured(u"CHIMERE_ROUTING_TRANSPORT must be set in"\
+ u" settings if you enable routing")
urlpatterns += patterns('chimere.views',
url(r'^(?P<area_name>[a-zA-Z0-9_-]*/)?route/'\
r'(?P<transport>(%s))/((?P<speed>[0-9][0-9]*)/)?'