Skip to content

Commit

Permalink
docs: devstack settings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
regisb committed Sep 12, 2024
1 parent 51b2d4a commit 99d8ff3
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -101,14 +101,16 @@ 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',
},
'common': {
PluginSettings.RELATIVE_PATH: 'settings.common',
},
'devstack': {
PluginSettings.RELATIVE_PATH: 'settings.devstack',
},
}
},

Expand Down Expand Up @@ -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': {
Expand Down

0 comments on commit 99d8ff3

Please sign in to comment.