File: conf.py

package info (click to toggle)
python-django-postgres-extra 2.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,096 kB
  • sloc: python: 9,057; makefile: 17; sh: 7; sql: 1
file content (36 lines) | stat: -rw-r--r-- 867 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import os
import sys
import sphinx_rtd_theme

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
sys.path.insert(0, os.path.abspath("../.."))

import django
django.setup()

project = "django-postgres-extra"
copyright = "2019-2021, Sector Labs"
author = "Sector Labs"
extensions = [
    "sphinx_rtd_theme",
    "sphinx.ext.intersphinx",
    "sphinx.ext.autodoc",
    "sphinx.ext.coverage",
    "sphinx.ext.napoleon",
]
templates_path = ["_templates"]
exclude_patterns = []
html_theme = "sphinx_rtd_theme"
def check_object_path(key, url, path):
    if os.path.isfile(path):
        return {key: (url, path)}
    return {}

intersphinx_mapping = {}
intersphinx_mapping.update(
    check_object_path(
        'django',
        'https://docs.djangoproject.com/en/' + django.get_version() + '/',
        '/usr/share/doc/python-django-doc/html/objects.inv'
    )
)