diff --git a/docs/conf.py b/docs/conf.py index 802b1b165d9e1cc953ac3f34d9acd1dc7c64362e..32b39117a3901e1803e01ca8a106db93b7d1e86b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,10 +12,11 @@ # 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. # -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - +import os +import sys +sys.path.insert(0, os.path.abspath('..')) +os.environ['DJANGO_SETTINGS_MODULE'] = 'biscuit.core.settings' +django.setup() # -- Project information ----------------------------------------------------- @@ -24,9 +25,9 @@ copyright = '2019, BiscuIT team @ Teckids e.V.' author = 'BiscuIT team @ Teckids e.V.' # The short X.Y version -version = '' +version = '1.0' # The full version, including alpha/beta/rc tags -release = '' +release = '1.0dev0' # -- General configuration --------------------------------------------------- @@ -40,6 +41,8 @@ release = '' # ones. extensions = [ 'sphinx.ext.autodoc', + 'sphinxcontrib_django', + 'sphinx_autodoc_typehints', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', ] @@ -51,7 +54,7 @@ templates_path = ['_templates'] # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] -source_suffix = '.md' +source_suffix = ['.rst', '.md'] # The master toctree document. master_doc = 'index' @@ -181,4 +184,5 @@ epub_exclude_files = ['search.html'] # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} +intersphinx_mapping = {'https://docs.python.org/': None, + 'https://docs.djangoproject.com/en/stable': 'https://docs.djangoproject.com/en/stable/_objects'}