diff --git a/doc/source/conf.py b/doc/source/conf.py index 661d794b..39d27e1a 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. diff --git a/tox.ini b/tox.ini index b48b7711..0f284bc7 100644 --- a/tox.ini +++ b/tox.ini @@ -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]