Skip to content

Commit b84440b

Browse files
committed
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
1 parent 2cefdd7 commit b84440b

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

ietf/settings.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,12 @@
8383
# to load the internationalization machinery.
8484
USE_I18N = False
8585

86-
# Absolute path to the directory that holds media.
87-
MEDIA_ROOT = BASE_DIR + "/../static/"
86+
USE_TZ = False
8887

89-
# URL that handles the media served from MEDIA_ROOT.
9088
MEDIA_URL = 'http://www.ietf.org/'
9189

9290
STATIC_URL = "/"
91+
STATIC_ROOT = os.path.abspath(BASE_DIR + "/../static/")
9392

9493
WSGI_APPLICATION = "ietf.wsgi.application"
9594

ietf/urls.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@
6868

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

0 commit comments

Comments
 (0)