summaryrefslogtreecommitdiff
path: root/doc/source/conf.py
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2017-06-05 09:38:29 +0000
committerAkihiro Motoki <amotoki@gmail.com>2017-06-05 09:39:31 +0000
commitb0a2a39508fe23d39be59663bb0aea6f6cb4e66f (patch)
treeaf0fa142b9801abc98c05ad4094b0eef4409f11f /doc/source/conf.py
parent525b76dc323db4c4e081eb5d42def6db14a84de9 (diff)
downloaddjango_openstack_auth-b0a2a39508fe23d39be59663bb0aea6f6cb4e66f.tar.gz
Fix doc build
Starting in Django 1.7, standalone scripts, such as a sphinx build require that django.setup() be called first. See: https://docs.djangoproject.com/en/1.8/releases/1.7/#standalone-scripts This should be added to the horizon/docs/source/conf.py setenv DJANGO_SETTINGS_MODULE for docs env in tox.ini is no longer needed as it is configured in doc/source/conf.py. Change-Id: I910dae37770ab9767689918a0c61b78d9c56115a
Diffstat (limited to 'doc/source/conf.py')
-rw-r--r--doc/source/conf.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 661d794..39d27e1 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -13,8 +13,12 @@
import os
+import django
+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'openstack_auth.tests.settings')
+django.setup()
+
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.