Adjust settings so we can change the comments service URL from Django config
This commit is contained in:
@@ -60,3 +60,5 @@ XQUEUE_INTERFACE = AUTH_TOKENS['XQUEUE_INTERFACE']
|
||||
if 'COURSE_ID' in ENV_TOKENS:
|
||||
ASKBOT_URL = "courses/{0}/discussions/".format(ENV_TOKENS['COURSE_ID'])
|
||||
|
||||
COMMENTS_SERVICE_URL = ENV_TOKENS["COMMENTS_SERVICE_URL"]
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
SERVICE_HOST = 'http://localhost:4567'
|
||||
from django.conf import settings
|
||||
|
||||
if hasattr(settings, "COMMENTS_SERVICE_URL"):
|
||||
SERVICE_HOST = settings.COMMENTS_SERVICE_URL
|
||||
else:
|
||||
SERVICE_HOST = 'http://localhost:4567'
|
||||
|
||||
PREFIX = SERVICE_HOST + '/api/v1'
|
||||
|
||||
Reference in New Issue
Block a user