openedx.core.djangoapps.plugins package#
Subpackages#
Submodules#
openedx.core.djangoapps.plugins.api module#
openedx.core.djangoapps.plugins.apps module#
Plugins Application Configuration
Signal handlers are connected here.
- class openedx.core.djangoapps.plugins.apps.PluginsConfig(app_name, app_module)#
Bases:
AppConfigApplication Configuration for Plugins.
- name = 'openedx.core.djangoapps.plugins'#
- plugin_app = {'settings_config': {'cms.djangoapp': {'production': {'relative_path': 'settings.production'}}, 'lms.djangoapp': {'production': {'relative_path': 'settings.production'}}}}#
- ready()#
Connect plugin receivers to their signals.
openedx.core.djangoapps.plugins.constants module#
Constants used by django app plugins
- class openedx.core.djangoapps.plugins.constants.ProjectType#
Bases:
objectThe ProjectType enum defines the possible values for the Django Projects that are available in the edx-platform. Plugin apps use these values to declare explicitly which projects they are extending.
- CMS = 'cms.djangoapp'#
- LMS = 'lms.djangoapp'#
- class openedx.core.djangoapps.plugins.constants.SettingsType#
Bases:
objectThe SettingsType enum defines the possible values for the settings files that are available for extension in the edx-platform. Plugin apps use these values (in addition to ProjectType) to declare explicitly which settings (in the specified project) they are extending.
See openedx/edx-platform for further information on each Settings Type.
- COMMON = 'common'#
- DEVSTACK = 'devstack'#
- PRODUCTION = 'production'#
- TEST = 'test'#
openedx.core.djangoapps.plugins.i18n_api module#
edx-platform specific i18n helpers for edx-django-utils plugins.
- class openedx.core.djangoapps.plugins.i18n_api.ArgparseArgument(flag: str = None, dest: str = None, help: str = None)#
Bases:
objectArgument specs to be used with argparse add_argument method.
- dest: str = None#
- flag: str = None#
- get_args()#
Return positional arguments for the add_argument method .
- get_kwargs()#
Return keyword arguments for the add_argument method .
- help: str = None#
- class openedx.core.djangoapps.plugins.i18n_api.BaseAtlasPullCommand(stdout=None, stderr=None, no_color=False, force_color=False)#
Bases:
BaseCommandBase atlas pull Django command.
- add_arguments(parser)#
Configure Django command arguments.
- ensure_empty_directory(directory)#
Ensure the pull directory is empty before running atlas pull.
- get_atlas_pull_options(**options)#
Pass-through the Django command options to atlas pull.
- openedx.core.djangoapps.plugins.i18n_api.atlas_pull_by_modules(module_names, locale_root, pull_options)#
Atlas pull translations by module name instead of repository name.
- openedx.core.djangoapps.plugins.i18n_api.compile_po_files(root_dir)#
Compile the .po files into .mo files recursively in the given directory.
Mimics the behavior of django-admin compilemessages for the po files but for any directory.
- openedx.core.djangoapps.plugins.i18n_api.get_installed_plugins_module_names()#
Return the installed plugins Python module names.
This function excludes the built-in edx-platform plugins such as lms, cms and openedx.
- openedx.core.djangoapps.plugins.i18n_api.plugin_translations_atlas_pull(pull_options, locale_root)#
Atlas pull the translations for the installed non-XBlocks plugins.