summaryrefslogtreecommitdiff
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
parent525b76dc323db4c4e081eb5d42def6db14a84de9 (diff)
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
Notes
Notes (review): Code-Review+1: Lucas H. Xu <xuh@bu.edu> Code-Review+2: Rob Cresswell <robert.cresswell@outlook.com> Workflow+1: Rob Cresswell <robert.cresswell@outlook.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 07 Jun 2017 13:25:51 +0000 Reviewed-on: https://review.openstack.org/470900 Project: openstack/django_openstack_auth Branch: refs/heads/master
-rw-r--r--doc/source/conf.py4
-rw-r--r--tox.ini1
2 files changed, 4 insertions, 1 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 @@
13 13
14import os 14import os
15 15
16import django
17
16os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'openstack_auth.tests.settings') 18os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'openstack_auth.tests.settings')
17 19
20django.setup()
21
18# If extensions (or modules to document with autodoc) are in another directory, 22# If extensions (or modules to document with autodoc) are in another directory,
19# add these directories to sys.path here. If the directory is relative to the 23# add these directories to sys.path here. If the directory is relative to the
20# documentation root, use os.path.abspath to make it absolute, like shown here. 24# documentation root, use os.path.abspath to make it absolute, like shown here.
diff --git a/tox.ini b/tox.ini
index b48b771..0f284bc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -53,7 +53,6 @@ commands = {posargs}
53 53
54[testenv:docs] 54[testenv:docs]
55setenv = {[env-common]setenv} 55setenv = {[env-common]setenv}
56 DJANGO_SETTINGS_MODULE=openstack_auth.tests.settings
57commands = python setup.py build_sphinx 56commands = python setup.py build_sphinx
58 57
59[flake8] 58[flake8]