diff --git a/ietf/settings.py b/ietf/settings.py index 34ea86cfb..490d896f6 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -83,13 +83,12 @@ SITE_ID = 1 # to load the internationalization machinery. USE_I18N = False -# Absolute path to the directory that holds media. -MEDIA_ROOT = BASE_DIR + "/../static/" +USE_TZ = False -# URL that handles the media served from MEDIA_ROOT. MEDIA_URL = 'http://www.ietf.org/' STATIC_URL = "/" +STATIC_ROOT = os.path.abspath(BASE_DIR + "/../static/") WSGI_APPLICATION = "ietf.wsgi.application" diff --git a/ietf/urls.py b/ietf/urls.py index ec51906b6..333d60144 100644 --- a/ietf/urls.py +++ b/ietf/urls.py @@ -68,10 +68,10 @@ urlpatterns = patterns('', if settings.SERVER_MODE in ('development', 'test'): urlpatterns += patterns('', - (r'^(?P(?:images|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), - (r'^(?Padmin/(?:img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), - (r'^(?Psecretariat/(img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), - (r'^(?Probots\.txt)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT+"dev/"}), + (r'^(?P(?:images|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), + (r'^(?Padmin/(?:img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), + (r'^(?Psecretariat/(img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), + (r'^(?Probots\.txt)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT+"dev/"}), (r'^_test500/$', lambda x: None), (r'^environment/$', 'ietf.help.views.environment'), )