From 8f7b25c5639dbe7912df35ea94dfb665d74d0107 Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Sun, 20 Nov 2011 23:43:34 +0530 Subject: Update the urls.py to use the URL_ROOT. --- urls.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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')), -- cgit