Merge pull request #1713 from edx/jarv/fix-static-url
fixes issue where STATIC_URL was overwritten without git.revision
This commit is contained in:
@@ -86,8 +86,12 @@ CELERY_QUEUES = {
|
||||
with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file:
|
||||
ENV_TOKENS = json.load(env_file)
|
||||
|
||||
# STATIC_URL specifies the url to use for static files
|
||||
STATIC_URL = ENV_TOKENS.get('STATIC_URL', STATIC_URL)
|
||||
# STATIC_URL_BASE specifies the base url to use for static files
|
||||
STATIC_URL_BASE = ENV_TOKENS.get('STATIC_URL_BASE', None)
|
||||
if STATIC_URL_BASE:
|
||||
# collectstatic will fail if STATIC_URL is a unicode string
|
||||
STATIC_URL = STATIC_URL_BASE.encode('ascii', 'ignore') + "/" + git.revision + "/"
|
||||
|
||||
# GITHUB_REPO_ROOT is the base directory
|
||||
# for course data
|
||||
GITHUB_REPO_ROOT = ENV_TOKENS.get('GITHUB_REPO_ROOT', GITHUB_REPO_ROOT)
|
||||
|
||||
@@ -108,8 +108,12 @@ STATIC_ROOT_BASE = ENV_TOKENS.get('STATIC_ROOT_BASE', None)
|
||||
if STATIC_ROOT_BASE:
|
||||
STATIC_ROOT = path(STATIC_ROOT_BASE)
|
||||
|
||||
# STATIC_URL specifies the url to use for static files
|
||||
STATIC_URL = ENV_TOKENS.get('STATIC_URL', STATIC_URL)
|
||||
|
||||
# STATIC_URL_BASE specifies the base url to use for static files
|
||||
STATIC_URL_BASE = ENV_TOKENS.get('STATIC_URL_BASE', None)
|
||||
if STATIC_URL_BASE:
|
||||
# collectstatic will fail if STATIC_URL is a unicode string
|
||||
STATIC_URL = STATIC_URL_BASE.encode('ascii', 'ignore') + "/"
|
||||
|
||||
PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', PLATFORM_NAME)
|
||||
# For displaying on the receipt. At Stanford PLATFORM_NAME != MERCHANT_NAME, but PLATFORM_NAME is a fine default
|
||||
|
||||
Reference in New Issue
Block a user