build: Simplify how we build docs.

Instead of trying to use the devstack settings file for building docs,
use the common settings file as the base for all settings.  The
devstack settings file builds on top of the production settings file
which are both oriented around reading settings from a yaml file and
getting them loaded in sanely into the dev and production environment.

For documentation, start with the common settings files which should be
sufficient to get a default version of the system up and running.

Note: We still leave the loop that enables all the feature flags as a way
of finding conditionally included API endpoints.
This commit is contained in:
Feanil Patel
2022-03-24 10:46:42 -04:00
parent b2488d8f6f
commit e35c7e278b
2 changed files with 12 additions and 4 deletions

View File

@@ -235,7 +235,7 @@ def update_settings_module(service='lms'):
Set the "DJANGO_SETTINGS_MODULE" environment variable appropriately
for the module sphinx-apidoc is about to be run on.
"""
if os.environ['EDX_PLATFORM_SETTINGS'] == 'devstack_docker':
if os.environ.get('EDX_PLATFORM_SETTINGS') == 'devstack_docker':
settings_module = f'{service}.envs.devstack_docker'
else:
settings_module = f'{service}.envs.devstack'