# -*- coding: utf-8 -*- # -- Path setup -------------------------------------------------------------- # 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. import os import sys import django from django.conf import settings from sphinx.ext.autodoc import between sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('../../')) # Pass settings into configure. settings.configure( INSTALLED_APPS=[ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'eav', ], SECRET_KEY=os.environ.get("DJANGO_SECRET_KEY", "this-is-not-s3cur3"), ) # Call django.setup to load installed apps and other stuff. django.setup() # -- Project information ----------------------------------------------------- project = 'Django EAV 2' copyright = '2018, Iwo Herka and team at MAKIMO' author = '-' # The short X.Y version version = '' # The full version, including alpha/beta/rc tags release = '0.10.0' # -- General configuration --------------------------------------------------- extensions = [ 'sphinx.ext.napoleon', 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', ] html_theme_options = dict( show_powered_by=False, show_related=True, fixed_sidebar=True, font_family='Roboto' ) templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' language = None exclude_patterns = [] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'alabaster' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # # 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'] # Custom sidebar templates, must be a dictionary that maps document names # to template names. # # The default sidebars (for documents that don't match any pattern) are # defined by theme itself. Builtin themes are using these templates by # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', # 'searchbox.html']``. # def setup(app): app.add_css_file('styles.css') app.connect('autodoc-process-docstring', between('^.*IGNORE.*$', exclude=True)) return app html_sidebars = { 'index': ['sidebarintro.html', 'localtoc.html'], '**': ['sidebarintro.html', 'localtoc.html', 'relations.html', 'searchbox.html'], } # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. htmlhelp_basename = 'DjangoEAV2doc' # -- Options for LaTeX output ------------------------------------------------ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'DjangoEAV2.tex', 'Django EAV 2 Documentation', '-', 'manual'), ] # -- Options for manual page output ------------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [(master_doc, 'djangoeav2', 'Django EAV 2 Documentation', [author], 1)] # -- Options for Texinfo output ---------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ( master_doc, 'DjangoEAV2', 'Django EAV 2 Documentation', author, 'DjangoEAV2', 'One line description of project.', 'Miscellaneous', ), ] # -- Extension configuration ------------------------------------------------- # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'https://docs.python.org/': None} # -- Autodoc configuration --------------------------------------------------- add_module_names = False