Merge pull request #172 from stewartadam/bugfix/configurable-urls

Permit MEDIA_URL and STATIC_URL to be set from environment variables
This commit is contained in:
vabene1111
2020-09-22 09:29:48 +02:00
committed by GitHub

View File

@@ -180,10 +180,10 @@ LANGUAGES = [
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files/
STATIC_URL = '/static/'
STATIC_URL = os.getenv('STATIC_URL', '/static/')
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")
MEDIA_URL = '/media/'
MEDIA_URL = os.getenv('MEDIA_URL', '/media/')
MEDIA_ROOT = os.path.join(BASE_DIR, "mediafiles")
# Serve static files with gzip