Files
edx-platform/openedx/core/djangoapps/plugins/apps.py
Manjinder Singh c76ed6ae45 Extracting plugin app from edx-platform (#24678)
* Moving plugins infrastructure to edx-django-utils
This PR extracts the code that enables plugins in edx-platform and puts it in edx-django-utils. This is done to allow other IDAS to add plugin functionality.
2020-08-12 07:48:53 -04:00

34 lines
730 B
Python

"""
Plugins Application Configuration
Signal handlers are connected here.
"""
from django.apps import AppConfig
from django.conf import settings
from edx_django_utils.plugins import connect_plugin_receivers
from openedx.core.djangoapps.plugins.constants import ProjectType
class PluginsConfig(AppConfig):
"""
Application Configuration for Plugins.
"""
name = 'openedx.core.djangoapps.plugins'
plugin_app = {}
def ready(self):
"""
Connect plugin receivers to their signals.
"""
if settings.ROOT_URLCONF == 'lms.urls':
project_type = ProjectType.LMS
else:
project_type = ProjectType.CMS
connect_plugin_receivers(project_type)