forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 6
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 #575 from edly-io/feat/use-forum-v2-apis
feat: Allow forum app to use Forum V2 APIs
- Loading branch information
Showing
2 changed files
with
35 additions
and
19 deletions.
There are no files selected for viewing
17 changes: 9 additions & 8 deletions
17
openedx/core/djangoapps/django_comment_common/comment_client/settings.py
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,17 +1,18 @@ | ||
# lint-amnesty, pylint: disable=cyclic-import, missing-module-docstring | ||
from django.conf import settings | ||
|
||
# FORUM V1 SERVICE HOST | ||
if hasattr(settings, "COMMENTS_SERVICE_URL"): | ||
SERVICE_HOST = settings.COMMENTS_SERVICE_URL | ||
COMMENTS_SERVICE_SERVICE_HOST = settings.COMMENTS_SERVICE_URL | ||
else: | ||
SERVICE_HOST = 'http://localhost:4567' | ||
COMMENTS_SERVICE_SERVICE_HOST = "http://localhost:4567" | ||
|
||
PREFIX = SERVICE_HOST + '/api/v1' | ||
COMMENTS_SERVICE_PREFIX = COMMENTS_SERVICE_SERVICE_HOST + "/api/v1" | ||
|
||
# V2 url support for differential logging | ||
if hasattr(settings, "COMMENTS_SERVICE_V2_URL"): | ||
SERVICE_HOST_V2 = settings.COMMENTS_SERVICE_V2_URL | ||
|
||
if hasattr(settings, "FORUM_V2_SERVICE_URL"): | ||
SERVICE_HOST = settings.FORUM_V2_SERVICE_URL | ||
else: | ||
SERVICE_HOST_V2 = 'http://localhost:8000' | ||
SERVICE_HOST = "http://localhost:8000" | ||
|
||
PREFIX_V2 = SERVICE_HOST_V2 + '/forum/forum_proxy/api/v1' | ||
PREFIX = SERVICE_HOST + "/forum/api/v2" |
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