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
|
2022-05-23 08:31:09 +00:00
|
|
|
|
2022-11-21 15:50:34 +00:00
|
|
|
from auditlog 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
|
2025-03-19 16:28:43 +00:00
|
|
|
|
|
|
|
|
sys.path.insert(0, os.path.abspath("../../auditlog_tests"))
|
2020-04-22 19:05:54 +00:00
|
|
|
|
|
|
|
|
# Setup Django for autodoc
|
2025-03-19 16:28:43 +00:00
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_settings")
|
2022-06-18 16:20:25 +00:00
|
|
|
import django # noqa: E402
|
2022-03-09 10:19:38 +00:00
|
|
|
|
2020-04-22 19:05:54 +00:00
|
|
|
django.setup()
|
|
|
|
|
|
|
|
|
|
# -- Project information -----------------------------------------------------
|
|
|
|
|
|
2022-03-09 10:19:38 +00:00
|
|
|
project = "django-auditlog"
|
|
|
|
|
author = "Jan-Jelle Kester and contributors"
|
|
|
|
|
copyright = f"2013-{date.today().year}, {author}"
|
2013-11-06 19:50:53 +00:00
|
|
|
|
2022-11-21 15:50:34 +00:00
|
|
|
release = __version__
|
2020-11-25 21:15:14 +00:00
|
|
|
# for example take major/minor
|
2022-03-09 10:19:38 +00:00
|
|
|
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 = [
|
2022-03-09 10:19:38 +00:00
|
|
|
"sphinx.ext.autodoc",
|
|
|
|
|
"sphinx.ext.viewcode",
|
2013-11-06 19:50:53 +00:00
|
|
|
]
|
|
|
|
|
|
2020-04-22 19:05:54 +00:00
|
|
|
# Master document that contains the root table of contents
|
2022-03-09 10:19:38 +00:00
|
|
|
master_doc = "index"
|
2013-11-06 19:50:53 +00:00
|
|
|
|
2020-04-22 19:05:54 +00:00
|
|
|
# Add any paths that contain templates here, relative to this directory.
|
2022-03-09 10:19:38 +00:00
|
|
|
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.
|
2022-03-09 10:19:38 +00:00
|
|
|
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
|
|
|
#
|
2022-03-09 10:19:38 +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".
|
2020-11-25 21:15:14 +00:00
|
|
|
# html_static_path = ['_static']
|