Merge pull request #21536 from edx/feanil/get_runserver_working

Fix errors when running runserver in python 3.
This commit is contained in:
Feanil Patel
2019-09-03 11:06:25 -04:00
committed by GitHub
3 changed files with 3 additions and 5 deletions

View File

@@ -116,8 +116,7 @@ EDX_PLATFORM_REVISION = ENV_TOKENS.get('EDX_PLATFORM_REVISION', EDX_PLATFORM_REV
# 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')
STATIC_URL = STATIC_URL_BASE
if not STATIC_URL.endswith("/"):
STATIC_URL += "/"
STATIC_URL += 'studio/'

View File

@@ -14,6 +14,6 @@ class Migration(migrations.Migration):
operations = [
migrations.AddIndex(
model_name='courseenrollment',
index=models.Index(fields=[b'user', b'-created'], name='student_cou_user_id_b19dcd_idx'),
index=models.Index(fields=['user', '-created'], name='student_cou_user_id_b19dcd_idx'),
),
]

View File

@@ -137,8 +137,7 @@ if STATIC_ROOT_BASE:
# 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')
STATIC_URL = STATIC_URL_BASE
if not STATIC_URL.endswith("/"):
STATIC_URL += "/"