Skip to content

Commit

Permalink
refactor: Convert discussions to pluggable app
Browse files Browse the repository at this point in the history
This minimizes our footprint outside of the djangoapp, now and moving
forward. Not only can we drop the `lms/envs/common.py` change, but we
can also avoid touching `lms/urls.py` when we add the API. Everything
can stay contained within `openedx/core/djangoapps/discussions`.
  • Loading branch information
stvstnfrd committed Feb 26, 2021
1 parent 602efa5 commit 8314971
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2867,7 +2867,6 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring

# Discussion forums
'openedx.core.djangoapps.django_comment_common',
'openedx.core.djangoapps.discussions',

# Notes
'lms.djangoapps.edxnotes',
Expand Down
8 changes: 8 additions & 0 deletions openedx/core/djangoapps/discussions/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
Configure the django app
"""
from django.apps import AppConfig
from edx_django_utils.plugins import PluginSettings
from edx_django_utils.plugins import PluginURLs


class DiscussionsConfig(AppConfig):
"""
Configure the discussions django app
"""
name = 'openedx.core.djangoapps.discussions'
plugin_app = {
PluginURLs.CONFIG: {
},
PluginSettings.CONFIG: {
},
}
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"credentials = openedx.core.djangoapps.credentials.apps:CredentialsConfig",
"content_libraries = openedx.core.djangoapps.content_libraries.apps:ContentLibrariesConfig",
"discussion = lms.djangoapps.discussion.apps:DiscussionConfig",
"discussions = openedx.core.djangoapps.discussions.apps:DiscussionsConfig",
"grades = lms.djangoapps.grades.apps:GradesConfig",
"plugins = openedx.core.djangoapps.plugins.apps:PluginsConfig",
"theming = openedx.core.djangoapps.theming.apps:ThemingConfig",
Expand Down

0 comments on commit 8314971

Please sign in to comment.