diff --git a/docs/Makefile b/docs/Makefile index 0e058e314..b409afa6b 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -2,7 +2,7 @@ # # You can set these variables from the command line. -SPHINXOPTS = -a -E +SPHINXOPTS = -W -a -E SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build diff --git a/docs/conf.py b/docs/conf.py index b386bb2e6..db3f46c03 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,9 +13,9 @@ import datetime import os import sys - from unittest import mock +import django MOCK_MODULES = [ 'webob', @@ -32,8 +32,19 @@ sys.path.insert(0, os.path.abspath('..')) sys.path.insert(0, os.path.abspath('..xblock',)) from xblock import __version__ + # -- General configuration ----------------------------------------------------- +# Use a settings module that allows all LMS and Studio code to be imported +# without errors. If running sphinx-apidoc, we already set a different +# settings module to use in the on_init() hook of the parent process +if 'DJANGO_SETTINGS_MODULE' not in os.environ: + os.environ['DJANGO_SETTINGS_MODULE'] = 'docs.docs_settings' + +django.setup() + + + # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' diff --git a/docs/docs_settings.py b/docs/docs_settings.py new file mode 100644 index 000000000..0cec4b57f --- /dev/null +++ b/docs/docs_settings.py @@ -0,0 +1 @@ +SECRET_KEY = "NOT_SECRET_KEy" diff --git a/docs/xblock-tutorial/glossary.rst b/docs/xblock-tutorial/glossary.rst index d1e39a5fe..ed497b813 100644 --- a/docs/xblock-tutorial/glossary.rst +++ b/docs/xblock-tutorial/glossary.rst @@ -2,4 +2,4 @@ Open edX Glossary ################# -:doc:`docs-openedx-org:developers/references/developer_guide/glossary` +:doc:`docs-openedx-org:developers/references/glossary`