add media and static url based on script_name

This commit is contained in:
aatish 2018-11-17 11:01:57 +05:45
parent 635b929b24
commit 3fd4273b5f

View file

@ -161,12 +161,12 @@ USE_TZ = True
# https://docs.djangoproject.com/en/2.1/howto/static-files/ # https://docs.djangoproject.com/en/2.1/howto/static-files/
STATIC_URL = '/static/' STATIC_URL = FORCE_SCRIPT_NAME + 'static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static/') STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/') MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
MEDIA_URL = '/media/' MEDIA_URL = FORCE_SCRIPT_NAME + 'media/'
CRISPY_TEMPLATE_PACK = 'bootstrap4' CRISPY_TEMPLATE_PACK = 'bootstrap4'