* Python code cleanup by the cleanup-python-code Jenkins job. This pull request was generated by the cleanup-python-code Jenkins job, which ran ``` cd lms/djangoapps/dashboard; find . -type f -name '*.py' | while read fname; do sed -i 's/ # lint-amnesty, pylint: disable=super-with-arguments//; s/ # lint-amnesty, pylint: disable=import-error, wrong-import-order//; s/ # lint-amnesty, pylint: disable=wrong-import-order//' "$fname"; done; find . -type f -name '*.py' | while read fname; do pyupgrade --exit-zero-even-if-changed --py3-plus --py36-plus --py38-plus "$fname"; done; isort --recursive . ``` The following packages were installed: `pyupgrade,isort` * feedback done Co-authored-by: Zulqarnain <muhammad.zulqarnain@arbisoft.com>
44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
"""
|
|
Discussion Application Configuration
|
|
|
|
Signal handlers are connected here.
|
|
"""
|
|
|
|
|
|
from django.apps import AppConfig
|
|
from edx_django_utils.plugins import PluginSettings, PluginURLs
|
|
|
|
from openedx.core.constants import COURSE_ID_PATTERN
|
|
from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType
|
|
|
|
|
|
class DiscussionConfig(AppConfig):
|
|
"""
|
|
Application Configuration for Discussion.
|
|
"""
|
|
|
|
name = 'lms.djangoapps.discussion'
|
|
plugin_app = {
|
|
PluginURLs.CONFIG: {
|
|
ProjectType.LMS: {
|
|
PluginURLs.NAMESPACE: '',
|
|
PluginURLs.REGEX: fr'^courses/{COURSE_ID_PATTERN}/discussion/forum/',
|
|
PluginURLs.RELATIVE_PATH: 'urls',
|
|
}
|
|
},
|
|
PluginSettings.CONFIG: {
|
|
ProjectType.CMS: {
|
|
SettingsType.COMMON: {PluginSettings.RELATIVE_PATH: 'settings.common'},
|
|
},
|
|
ProjectType.LMS: {
|
|
SettingsType.COMMON: {PluginSettings.RELATIVE_PATH: 'settings.common'},
|
|
},
|
|
}
|
|
}
|
|
|
|
def ready(self):
|
|
"""
|
|
Connect handlers to send notifications about discussions.
|
|
"""
|
|
from .signals import handlers # pylint: disable=unused-import
|