conf.py 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Django documentation build configuration file, created by
  4. # sphinx-quickstart on Thu Mar 27 09:06:53 2008.
  5. #
  6. # This file is execfile()d with the current directory set to its containing dir.
  7. #
  8. # The contents of this file are pickled, so don't put values in the namespace
  9. # that aren't pickleable (module imports are okay, they're removed automatically).
  10. #
  11. # All configuration values have a default; values that are commented out
  12. # serve to show the default.
  13. from __future__ import unicode_literals
  14. import sys
  15. from os.path import abspath, dirname, join
  16. # Make sure we get the version of this copy of Django
  17. sys.path.insert(1, dirname(dirname(abspath(__file__))))
  18. # If extensions (or modules to document with autodoc) are in another directory,
  19. # add these directories to sys.path here. If the directory is relative to the
  20. # documentation root, use os.path.abspath to make it absolute, like shown here.
  21. sys.path.append(abspath(join(dirname(__file__), "_ext")))
  22. # -- General configuration -----------------------------------------------------
  23. # If your documentation needs a minimal Sphinx version, state it here.
  24. needs_sphinx = '1.0'
  25. # Add any Sphinx extension module names here, as strings. They can be extensions
  26. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
  27. extensions = [
  28. "djangodocs",
  29. "sphinx.ext.intersphinx",
  30. "sphinx.ext.viewcode",
  31. "ticket_role",
  32. ]
  33. # Add any paths that contain templates here, relative to this directory.
  34. # templates_path = []
  35. # The suffix of source filenames.
  36. source_suffix = '.txt'
  37. # The encoding of source files.
  38. #source_encoding = 'utf-8-sig'
  39. # The master toctree document.
  40. master_doc = 'contents'
  41. # General substitutions.
  42. project = 'Django'
  43. copyright = 'Django Software Foundation and contributors'
  44. # The version info for the project you're documenting, acts as replacement for
  45. # |version| and |release|, also used in various other places throughout the
  46. # built documents.
  47. #
  48. # The short X.Y version.
  49. version = '1.6'
  50. # The full version, including alpha/beta/rc tags.
  51. try:
  52. from django import VERSION, get_version
  53. except ImportError:
  54. release = version
  55. else:
  56. def django_release():
  57. pep386ver = get_version()
  58. if VERSION[3:5] == ('alpha', 0) and 'dev' not in pep386ver:
  59. return pep386ver + '.dev'
  60. return pep386ver
  61. release = django_release()
  62. # The "development version" of Django
  63. django_next_version = '1.7'
  64. # The language for content autogenerated by Sphinx. Refer to documentation
  65. # for a list of supported languages.
  66. #language = None
  67. # Location for .po/.mo translation files used when language is set
  68. locale_dirs = ['locale/']
  69. # There are two options for replacing |today|: either, you set today to some
  70. # non-false value, then it is used:
  71. #today = ''
  72. # Else, today_fmt is used as the format for a strftime call.
  73. today_fmt = '%B %d, %Y'
  74. # List of patterns, relative to source directory, that match files and
  75. # directories to ignore when looking for source files.
  76. exclude_patterns = ['_build']
  77. # The reST default role (used for this markup: `text`) to use for all documents.
  78. #default_role = None
  79. # If true, '()' will be appended to :func: etc. cross-reference text.
  80. add_function_parentheses = True
  81. # If true, the current module name will be prepended to all description
  82. # unit titles (such as .. function::).
  83. add_module_names = False
  84. # If true, sectionauthor and moduleauthor directives will be shown in the
  85. # output. They are ignored by default.
  86. show_authors = False
  87. # The name of the Pygments (syntax highlighting) style to use.
  88. pygments_style = 'trac'
  89. # Links to Python's docs should reference the most recent version of the 2.x
  90. # branch, which is located at this URL.
  91. intersphinx_mapping = {
  92. 'python': ('http://docs.python.org/2.7', None),
  93. 'sphinx': ('http://sphinx.pocoo.org/', None),
  94. 'six': ('http://pythonhosted.org/six/', None),
  95. 'simplejson': ('http://simplejson.readthedocs.org/en/latest/', None),
  96. }
  97. # Python's docs don't change every week.
  98. intersphinx_cache_limit = 90 # days
  99. # -- Options for HTML output ---------------------------------------------------
  100. # The theme to use for HTML and HTML Help pages. See the documentation for
  101. # a list of builtin themes.
  102. html_theme = "djangodocs"
  103. # Theme options are theme-specific and customize the look and feel of a theme
  104. # further. For a list of options available for each theme, see the
  105. # documentation.
  106. #html_theme_options = {}
  107. # Add any paths that contain custom themes here, relative to this directory.
  108. html_theme_path = ["_theme"]
  109. # The name for this set of Sphinx documents. If None, it defaults to
  110. # "<project> v<release> documentation".
  111. #html_title = None
  112. # A shorter title for the navigation bar. Default is the same as html_title.
  113. #html_short_title = None
  114. # The name of an image file (relative to this directory) to place at the top
  115. # of the sidebar.
  116. #html_logo = None
  117. # The name of an image file (within the static path) to use as favicon of the
  118. # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
  119. # pixels large.
  120. #html_favicon = None
  121. # Add any paths that contain custom static files (such as style sheets) here,
  122. # relative to this directory. They are copied after the builtin static files,
  123. # so a file named "default.css" will overwrite the builtin "default.css".
  124. #html_static_path = ["_static"]
  125. # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  126. # using the given strftime format.
  127. html_last_updated_fmt = '%b %d, %Y'
  128. # If true, SmartyPants will be used to convert quotes and dashes to
  129. # typographically correct entities.
  130. html_use_smartypants = True
  131. # HTML translator class for the builder
  132. html_translator_class = "djangodocs.DjangoHTMLTranslator"
  133. # Content template for the index page.
  134. #html_index = ''
  135. # Custom sidebar templates, maps document names to template names.
  136. #html_sidebars = {}
  137. # Additional templates that should be rendered to pages, maps page names to
  138. # template names.
  139. html_additional_pages = {}
  140. # If false, no module index is generated.
  141. #html_domain_indices = True
  142. # If false, no index is generated.
  143. #html_use_index = True
  144. # If true, the index is split into individual pages for each letter.
  145. #html_split_index = False
  146. # If true, links to the reST sources are added to the pages.
  147. #html_show_sourcelink = True
  148. # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
  149. #html_show_sphinx = True
  150. # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
  151. #html_show_copyright = True
  152. # If true, an OpenSearch description file will be output, and all pages will
  153. # contain a <link> tag referring to it. The value of this option must be the
  154. # base URL from which the finished HTML is served.
  155. #html_use_opensearch = ''
  156. # This is the file name suffix for HTML files (e.g. ".xhtml").
  157. #html_file_suffix = None
  158. # Output file base name for HTML help builder.
  159. htmlhelp_basename = 'Djangodoc'
  160. modindex_common_prefix = ["django."]
  161. # Appended to every page
  162. rst_epilog = """
  163. .. |django-users| replace:: :ref:`django-users <django-users-mailing-list>`
  164. .. |django-core-mentorship| replace:: :ref:`django-core-mentorship <django-core-mentorship-mailing-list>`
  165. .. |django-developers| replace:: :ref:`django-developers <django-developers-mailing-list>`
  166. .. |django-announce| replace:: :ref:`django-announce <django-announce-mailing-list>`
  167. .. |django-updates| replace:: :ref:`django-updates <django-updates-mailing-list>`
  168. """
  169. # -- Options for LaTeX output --------------------------------------------------
  170. latex_elements = {
  171. 'preamble': ('\\DeclareUnicodeCharacter{2264}{\\ensuremath{\\le}}'
  172. '\\DeclareUnicodeCharacter{2265}{\\ensuremath{\\ge}}')
  173. }
  174. # Grouping the document tree into LaTeX files. List of tuples
  175. # (source start file, target name, title, author, document class [howto/manual]).
  176. #latex_documents = []
  177. latex_documents = [
  178. ('contents', 'django.tex', 'Django Documentation',
  179. 'Django Software Foundation', 'manual'),
  180. ]
  181. # The name of an image file (relative to this directory) to place at the top of
  182. # the title page.
  183. #latex_logo = None
  184. # For "manual" documents, if this is true, then toplevel headings are parts,
  185. # not chapters.
  186. #latex_use_parts = False
  187. # If true, show page references after internal links.
  188. #latex_show_pagerefs = False
  189. # If true, show URL addresses after external links.
  190. #latex_show_urls = False
  191. # Documents to append as an appendix to all manuals.
  192. #latex_appendices = []
  193. # If false, no module index is generated.
  194. #latex_domain_indices = True
  195. # -- Options for manual page output --------------------------------------------
  196. # One entry per manual page. List of tuples
  197. # (source start file, name, description, authors, manual section).
  198. man_pages = [
  199. ('contents', 'django', 'Django Documentation', ['Django Software Foundation'], 1)
  200. ]
  201. # -- Options for Texinfo output ------------------------------------------------
  202. # List of tuples (startdocname, targetname, title, author, dir_entry,
  203. # description, category, toctree_only)
  204. texinfo_documents=[(
  205. master_doc, "django", "", "", "Django",
  206. "Documentation of the Django framework", "Web development", False
  207. )]
  208. # -- Options for Epub output ---------------------------------------------------
  209. # Bibliographic Dublin Core info.
  210. epub_title = 'Django'
  211. epub_author = 'Django Software Foundation'
  212. epub_publisher = 'Django Software Foundation'
  213. epub_copyright = '2010, Django Software Foundation'
  214. # The language of the text. It defaults to the language option
  215. # or en if the language is not set.
  216. #epub_language = ''
  217. # The scheme of the identifier. Typical schemes are ISBN or URL.
  218. #epub_scheme = ''
  219. # The unique identifier of the text. This can be a ISBN number
  220. # or the project homepage.
  221. #epub_identifier = ''
  222. # A unique identification for the text.
  223. #epub_uid = ''
  224. # HTML files that should be inserted before the pages created by sphinx.
  225. # The format is a list of tuples containing the path and title.
  226. #epub_pre_files = []
  227. # HTML files shat should be inserted after the pages created by sphinx.
  228. # The format is a list of tuples containing the path and title.
  229. #epub_post_files = []
  230. # A list of files that should not be packed into the epub file.
  231. #epub_exclude_files = []
  232. # The depth of the table of contents in toc.ncx.
  233. #epub_tocdepth = 3
  234. # Allow duplicate toc entries.
  235. #epub_tocdup = True
  236. # -- ticket options ------------------------------------------------------------
  237. ticket_url = 'https://code.djangoproject.com/ticket/%s'