From 99d8ff3463b2c070deefa98169844b0e1c399ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Thu, 12 Sep 2024 11:22:04 +0200 Subject: [PATCH] docs: devstack settings Plugins may have a "devstack" setting, and this was not documented (as far as I know). I was bitten by this as I was trying to override settings in a plugin, and my settings were being overridden by devstack settings. --- .../plugins/docs/how_tos/how_to_create_a_plugin_app.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/edx_django_utils/plugins/docs/how_tos/how_to_create_a_plugin_app.rst b/edx_django_utils/plugins/docs/how_tos/how_to_create_a_plugin_app.rst index f0028aaf..b2e77a75 100644 --- a/edx_django_utils/plugins/docs/how_tos/how_to_create_a_plugin_app.rst +++ b/edx_django_utils/plugins/docs/how_tos/how_to_create_a_plugin_app.rst @@ -48,7 +48,7 @@ file:: } ) -3. (optional, but recommended) Create a top-level settings/ directory with common.py and production.py modules. This will allow you to use the PluginSettings.CONFIG option as written below. +3. (optional, but recommended) Create a top-level settings/ directory with common.py, devstack.py and production.py modules. This will allow you to use the PluginSettings.CONFIG option as written below. 4. configure the Plugin App in their AppConfig. The app must have a ``plugin_app`` field set to a dictionary, even if the dictionary is empty. Note that in this example, we are explicitly configuring plugins for use in edx-platform. If your plugin is going to be used in another IDA, you may have different project and settings types. You will need to look at the IDA in question for what values it expects. You may want to add new values to the relevant enums. @@ -101,7 +101,6 @@ class:: # Configure each settings, as needed. 'production': { - # The python path (relative to this app) to the settings module for the relevant Project Type and Settings Type. # Optional; Defaults to 'settings'. PluginSettings.RELATIVE_PATH: 'settings.production', @@ -109,6 +108,9 @@ class:: 'common': { PluginSettings.RELATIVE_PATH: 'settings.common', }, + 'devstack': { + PluginSettings.RELATIVE_PATH: 'settings.devstack', + }, } }, @@ -174,6 +176,7 @@ OR use string constants when they cannot import from djangoapps.plugins:: 'lms.djangoapp': { 'production': { 'relative_path': 'settings.production' }, 'common': { 'relative_path': 'settings.common' }, + 'devstack': { 'relative_path': 'settings.devstack' }, } }, 'signals_config': {