diff options
author | Prabhu Ramachandran | 2011-11-20 23:43:34 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2011-11-20 23:43:34 +0530 |
commit | 8f7b25c5639dbe7912df35ea94dfb665d74d0107 (patch) | |
tree | 5e88e74f16edf4a849b7ab47d8268395ac6460e1 /urls.py | |
parent | 5650db889ad19d199efe06c59f766698a515a4c5 (diff) | |
download | online_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.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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')), |