-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #253 from ropable/master
Updates to handle differences between local files and blobs
- Loading branch information
Showing
7 changed files
with
50 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,11 @@ | |
ROOT_URLCONF = 'prs2.urls' | ||
WSGI_APPLICATION = 'prs2.wsgi.application' | ||
|
||
# Use Azure blob storage for media uploads, unless explicitly set otherwise. | ||
if env('LOCAL_MEDIA_STORAGE', False): | ||
# Assume Azure blob storage is used for media uploads, unless explicitly set as local storage. | ||
LOCAL_MEDIA_STORAGE = env('LOCAL_MEDIA_STORAGE', False) | ||
if LOCAL_MEDIA_STORAGE: | ||
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' | ||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') | ||
else: | ||
DEFAULT_FILE_STORAGE = 'storages.backends.azure_storage.AzureStorage' | ||
AZURE_ACCOUNT_NAME = env('AZURE_ACCOUNT_NAME', 'name') | ||
|
@@ -115,7 +117,7 @@ | |
LOGIN_REDIRECT_URL = '/' | ||
APPLICATION_TITLE = 'Planning Referral System' | ||
APPLICATION_ACRONYM = 'PRS' | ||
APPLICATION_VERSION_NO = '2.5.32' | ||
APPLICATION_VERSION_NO = '2.5.33' | ||
APPLICATION_ALERTS_EMAIL = '[email protected]' | ||
SITE_URL = env('SITE_URL', 'localhost') | ||
PRS_USER_GROUP = env('PRS_USER_GROUP', 'PRS user') | ||
|
@@ -183,14 +185,15 @@ | |
) | ||
|
||
# Static files (CSS, JavaScript, Images) | ||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') | ||
MEDIA_URL = '/media/' | ||
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') | ||
STATIC_URL = '/static/' | ||
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'prs2', 'static'),) | ||
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' | ||
WHITENOISE_ROOT = STATIC_ROOT | ||
|
||
# Media uploads | ||
MEDIA_URL = '/media/' | ||
|
||
# This is required to add context variables to all templates: | ||
STATIC_CONTEXT_VARS = {} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "prs" | ||
version = "2.5.32" | ||
version = "2.5.33" | ||
description = "Planning Referral System corporate application" | ||
authors = ["Ashley Felton <[email protected]>"] | ||
license = "Apache-2.0" | ||
|