Get rid of the DEVELOPMENT global flag, DEBUG now triggers development mode too
This commit is contained in:
@@ -71,14 +71,14 @@ mimetype_icons = {
|
||||
|
||||
def get_icon_file_path(mimetype):
|
||||
file_name = mimetype_icons.get(mimetype, UNKNWON_TYPE_FILE_NAME)
|
||||
if settings.DEVELOPMENT:
|
||||
if settings.DEBUG:
|
||||
return os.path.join(settings.BASE_DIR, 'apps', 'mimetype', 'static', MIMETYPE_ICONS_DIRECTORY_NAME, file_name)
|
||||
else:
|
||||
return os.path.join(settings.STATIC_ROOT, MIMETYPE_ICONS_DIRECTORY_NAME, file_name)
|
||||
|
||||
|
||||
def get_error_icon_file_path():
|
||||
if settings.DEVELOPMENT:
|
||||
if settings.DEBUG:
|
||||
return os.path.join(settings.BASE_DIR, 'apps', 'mimetype', 'static', MIMETYPE_ICONS_DIRECTORY_NAME, ERROR_FILE_NAME)
|
||||
else:
|
||||
return os.path.join(settings.STATIC_ROOT, MIMETYPE_ICONS_DIRECTORY_NAME, ERROR_FILE_NAME)
|
||||
|
||||
@@ -55,7 +55,7 @@ def handler500(request):
|
||||
'request': request,
|
||||
})))
|
||||
|
||||
if settings.DEVELOPMENT:
|
||||
if settings.DEBUG:
|
||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||
urlpatterns += staticfiles_urlpatterns()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user