django-auditlog/docs/source/conf.py

70 lines
2.4 KiB
Python
Raw Normal View History

2020-04-22 19:05:54 +00:00
# Configuration file for the Sphinx documentation builder.
2013-11-06 19:50:53 +00:00
#
2020-04-22 19:05:54 +00:00
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Preliminary -------------------------------------------------------------
2013-11-06 19:50:53 +00:00
import os
2020-04-22 19:05:54 +00:00
import sys
from datetime import date
from importlib.metadata import version
2020-04-22 19:05:54 +00:00
# -- Path setup --------------------------------------------------------------
2013-11-06 19:50:53 +00:00
# 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.
2014-07-08 14:55:24 +00:00
2020-04-22 19:05:54 +00:00
# Add sources folder
sys.path.insert(0, os.path.abspath('../../'))
# Setup Django for autodoc
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'auditlog_tests.test_settings')
import django
django.setup()
# -- Project information -----------------------------------------------------
project = 'django-auditlog'
author = 'Jan-Jelle Kester and contributors'
copyright = f'2013-{date.today().year}, {author}'
2013-11-06 19:50:53 +00:00
release = version('django-auditlog')
# for example take major/minor
version = '.'.join(release.split('.')[:2])
2013-11-06 19:50:53 +00:00
2020-04-22 19:05:54 +00:00
# -- General configuration ---------------------------------------------------
2013-11-06 19:50:53 +00:00
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
]
2020-04-22 19:05:54 +00:00
# Master document that contains the root table of contents
2013-11-06 19:50:53 +00:00
master_doc = 'index'
2020-04-22 19:05:54 +00:00
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
2013-11-06 19:50:53 +00:00
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
2020-04-22 19:05:54 +00:00
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
2013-11-06 19:50:53 +00:00
2020-04-22 19:05:54 +00:00
# -- Options for HTML output -------------------------------------------------
2013-11-06 19:50:53 +00:00
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
2020-04-22 19:05:54 +00:00
#
2015-05-14 23:30:09 +00:00
html_theme = 'sphinx_rtd_theme'
2013-11-06 19:50:53 +00:00
# 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']