summaryrefslogtreecommitdiff
path: root/urls.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2011-11-20 23:43:34 +0530
committerPrabhu Ramachandran2011-11-20 23:43:34 +0530
commit8f7b25c5639dbe7912df35ea94dfb665d74d0107 (patch)
tree5e88e74f16edf4a849b7ab47d8268395ac6460e1 /urls.py
parent5650db889ad19d199efe06c59f766698a515a4c5 (diff)
downloadonline_test-8f7b25c5639dbe7912df35ea94dfb665d74d0107.tar.gz
online_test-8f7b25c5639dbe7912df35ea94dfb665d74d0107.tar.bz2
online_test-8f7b25c5639dbe7912df35ea94dfb665d74d0107.zip
Update the urls.py to use the URL_ROOT.
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/urls.py b/urls.py
index f55309a..f05f758 100644
--- a/urls.py
+++ b/urls.py
@@ -4,8 +4,15 @@ from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
admin.autodiscover()
+from settings import URL_ROOT
+
+if URL_ROOT.startswith('/'):
+ URL_BASE = r'^%s/exam/'%URL_ROOT[1:]
+else:
+ URL_BASE = r'^exam/'
+
urlpatterns = patterns('',
- url(r'^exam/', include('exam.urls')),
+ url(URL_BASE, include('exam.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),