Files
edx-platform/openedx/core/djangoapps/discussions/apps.py
Kshitij Sobti 79cd0b1ef8 feat: Adds discussions settings for new discusions experience [BD-38] [TNL-8621] [BB-4854] (#29131)
* feat: Adds discussions settings for new discusions experience
This commit adds new discussions settings for the new discussions experience. These are stored in the course so they can be a part of course import/export flow.
These are also added to the discussions configuraiton API to allow MFEs to update the settings.
The discussions API is currently available via LMS, however that means it cannot save changes to the modulestore. This also adds the API to the studio config so it can now also be accessed from studio and be used to save course settings.

* fix: tests
2021-10-28 11:56:17 +05:00

33 lines
983 B
Python

"""
Configure the django app
"""
from django.apps import AppConfig
from edx_django_utils.plugins import PluginSettings
from edx_django_utils.plugins import PluginURLs
from openedx.core.djangoapps.plugins.constants import ProjectType
class DiscussionsConfig(AppConfig):
"""
Configure the discussions django app
"""
name = 'openedx.core.djangoapps.discussions'
plugin_app = {
PluginURLs.CONFIG: {
# TODO: Remove the LMS path once its usage has been removed from frontend-app-course-authoring.
ProjectType.LMS: {
PluginURLs.NAMESPACE: '',
PluginURLs.REGEX: r'^discussions/api/',
PluginURLs.RELATIVE_PATH: 'urls',
},
ProjectType.CMS: {
PluginURLs.NAMESPACE: '',
PluginURLs.REGEX: r'^api/discussions/',
PluginURLs.RELATIVE_PATH: 'urls',
},
},
PluginSettings.CONFIG: {
},
}