From 558a005836fe0384a592f2d161333e1aa486a60a Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Wed, 13 May 2009 06:11:40 +0100 Subject: [PATCH] [svn] Smart url joining Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8311 by aaron @ 3/27/2009 4:11 PM --- settings.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/settings.py b/settings.py index 8e8a67e..5c1d48b 100644 --- a/settings.py +++ b/settings.py @@ -1,6 +1,6 @@ from localsettings import * import os -import urllib +import urlparse # Django settings for troggle project. DEBUG = True @@ -35,10 +35,10 @@ USE_I18N = True # Examples: "http://foo.com/media/", "/media/". ADMIN_MEDIA_PREFIX = '/troggle/media-admin/' PHOTOS_ROOT = os.path.join(EXPOWEB, 'photos') -MEDIA_URL = URL_ROOT+'site_media/' -SURVEYS_URL = URL_ROOT+'/survey_scans/' -PHOTOS_URL = URL_ROOT+'/photos/' -SVX_URL = URL_ROOT+'/survex/' +MEDIA_URL = urlparse.urljoin(URL_ROOT , '/site_media/') +SURVEYS_URL = urlparse.urljoin(URL_ROOT , '/survey_scans/') +PHOTOS_URL = urlparse.urljoin(URL_ROOT , '/photos/') +SVX_URL = urlparse.urljoin(URL_ROOT , '/survex/') APPEND_SLASH = False SMART_APPEND_SLASH = True