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
This commit is contained in:
Akihiro Motoki 2017-06-05 09:38:29 +00:00
parent 525b76dc32
commit b0a2a39508
2 changed files with 4 additions and 1 deletions

View File

@ -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.

View File

@ -53,7 +53,6 @@ commands = {posargs}
[testenv:docs]
setenv = {[env-common]setenv}
DJANGO_SETTINGS_MODULE=openstack_auth.tests.settings
commands = python setup.py build_sphinx
[flake8]