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
1 changed files with 2 additions and 2 deletions

View File

@ -161,12 +161,12 @@ USE_TZ = True
# 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/')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
MEDIA_URL = '/media/'
MEDIA_URL = FORCE_SCRIPT_NAME + 'media/'
CRISPY_TEMPLATE_PACK = 'bootstrap4'