MEDIA_ROOT -> STATIC_ROOT - apparently we don't really use MEDIA_ROOT at the moment since all files are handled not through file fields, but through explicit management of their paths

- Legacy-Id: 6980
This commit is contained in:
Ole Laursen 2013-12-18 13:18:58 +00:00
parent 2cefdd7410
commit b84440b857
2 changed files with 6 additions and 7 deletions

View file

@ -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"

View file

@ -68,10 +68,10 @@ urlpatterns = patterns('',
if settings.SERVER_MODE in ('development', 'test'):
urlpatterns += patterns('',
(r'^(?P<path>(?:images|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
(r'^(?P<path>admin/(?:img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
(r'^(?P<path>secretariat/(img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
(r'^(?P<path>robots\.txt)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT+"dev/"}),
(r'^(?P<path>(?:images|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
(r'^(?P<path>admin/(?:img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
(r'^(?P<path>secretariat/(img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
(r'^(?P<path>robots\.txt)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT+"dev/"}),
(r'^_test500/$', lambda x: None),
(r'^environment/$', 'ietf.help.views.environment'),
)