diff --git a/doc/source/conf.py b/doc/source/conf.py index b8e0af9..93f36e6 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -28,6 +28,8 @@ import os import subprocess import sys +import django + BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", "..")) @@ -37,8 +39,12 @@ sys.path.insert(0, ROOT) os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'openstack_dashboard.test.settings') -from zaqar_ui \ - import version as zaqarui_ver +# Starting in Django 1.7, standalone scripts, such as a sphinx build +# require that django.setup() be called first. +# https://docs.djangoproject.com/en/1.8/releases/1.7/#standalone-scripts +django.setup() + +from zaqar_ui import version as zaqarui_ver def write_autodoc_index(): @@ -270,7 +276,7 @@ html_theme_options = { # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [''] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/setup.cfg b/setup.cfg index 03c31c3..9058c0c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,4 +27,4 @@ packages = all_files = 1 build-dir = doc/build source-dir = doc/source - +warning-is-error = 1