X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/2c968d7bbf97b820439c6a997de08cc3411abb07..9c2555ad140dca1c09cde628bd22aac811e05b7e:/doc/conf.py diff --git a/doc/conf.py b/doc/conf.py index edbc49f6e..7c09286af 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # Wolne Lektury documentation build configuration file, created by # sphinx-quickstart on Fri Mar 30 16:42:44 2012. # @@ -12,21 +10,18 @@ # serve to show the default. import sys, os +import django # 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. #sys.path.insert(0, os.path.abspath('.')) sys.path += [ - os.path.abspath('../wolnelektury'), - os.path.abspath('../apps'), - os.path.abspath('../lib'), - os.path.abspath('../lib/librarian'), + os.path.abspath('../src'), ] -from django.core.management import setup_environ -import settings -setup_environ(settings) +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wolnelektury.settings") +django.setup() @@ -37,7 +32,7 @@ setup_environ(settings) # 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.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode'] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.extlinks', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -52,8 +47,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'Wolne Lektury' -copyright = u'2007-2012, Fundacja Nowoczesna Polska' +project = 'Wolne Lektury' +copyright = '2007-2019, Fundacja Nowoczesna Polska' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -132,7 +127,7 @@ html_theme = 'default' # 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'] +#html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. @@ -190,8 +185,8 @@ htmlhelp_basename = 'WolneLekturydoc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'WolneLektury.tex', u'Wolne Lektury Documentation', - u'Fundacja Nowoczesna Polska', 'manual'), + ('index', 'WolneLektury.tex', 'Wolne Lektury Documentation', + 'Fundacja Nowoczesna Polska', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -223,10 +218,13 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'wolnelektury', u'Wolne Lektury Documentation', - [u'Fundacja Nowoczesna Polska'], 1) + ('index', 'wolnelektury', 'Wolne Lektury Documentation', + ['Fundacja Nowoczesna Polska'], 1) ] - -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'http://docs.python.org/': None} +extlinks = { + 'django': ( + 'https://docs.djangoproject.com/en/%d.%d/%%s' % django.VERSION[:2], + None + ) +}