Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added the basics needed to build Django's docs using [http://sphinx.p…

…ocoo.org/ Sphinx]. If you've got Sphinx installed (the latest version) along with [http://docutils.sf.net docutils], you should be able to easily build the docs locally using {{{sphinx-build}}} or the included {{{Makefile}}}. This use a basic (and pretty crappy) index for the documentation and the built-in Sphinx styles (which are actually quite nice).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7370 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7dd4be581beadd8d0ec751054e0f72ef36aef5cf 1 parent d5cb46f
Jacob Kaplan-Moss authored March 27, 2008
68  docs/Makefile
... ...
@@ -0,0 +1,68 @@
  1
+# Makefile for Sphinx documentation
  2
+#
  3
+
  4
+# You can set these variables from the command line.
  5
+SPHINXOPTS    =
  6
+SPHINXBUILD   = sphinx-build
  7
+PAPER         =
  8
+
  9
+# Internal variables.
  10
+PAPEROPT_a4     = -D latex_paper_size=a4
  11
+PAPEROPT_letter = -D latex_paper_size=letter
  12
+ALLSPHINXOPTS   = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
  13
+
  14
+.PHONY: help clean html web htmlhelp latex changes linkcheck
  15
+
  16
+help:
  17
+	@echo "Please use \`make <target>' where <target> is one of"
  18
+	@echo "  html      to make standalone HTML files"
  19
+	@echo "  web       to make files usable by Sphinx.web"
  20
+	@echo "  htmlhelp  to make HTML files and a HTML help project"
  21
+	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
  22
+	@echo "  changes   to make an overview over all changed/added/deprecated items"
  23
+	@echo "  linkcheck to check all external links for integrity"
  24
+
  25
+clean:
  26
+	-rm -rf _build/*
  27
+
  28
+html:
  29
+	mkdir -p _build/html _build/doctrees
  30
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
  31
+	@echo
  32
+	@echo "Build finished. The HTML pages are in _build/html."
  33
+
  34
+web:
  35
+	mkdir -p _build/web _build/doctrees
  36
+	$(SPHINXBUILD) -b web $(ALLSPHINXOPTS) _build/web
  37
+	@echo
  38
+	@echo "Build finished; now you can run"
  39
+	@echo "  python -m sphinx.web _build/web"
  40
+	@echo "to start the server."
  41
+
  42
+htmlhelp:
  43
+	mkdir -p _build/htmlhelp _build/doctrees
  44
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
  45
+	@echo
  46
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
  47
+	      ".hhp project file in _build/htmlhelp."
  48
+
  49
+latex:
  50
+	mkdir -p _build/latex _build/doctrees
  51
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
  52
+	@echo
  53
+	@echo "Build finished; the LaTeX files are in _build/latex."
  54
+	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
  55
+	      "run these through (pdf)latex."
  56
+
  57
+changes:
  58
+	mkdir -p _build/changes _build/doctrees
  59
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
  60
+	@echo
  61
+	@echo "The overview file is in _build/changes."
  62
+
  63
+linkcheck:
  64
+	mkdir -p _build/linkcheck _build/doctrees
  65
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
  66
+	@echo
  67
+	@echo "Link check complete; look for any errors in the above output " \
  68
+	      "or in _build/linkcheck/output.txt."
132  docs/conf.py
... ...
@@ -0,0 +1,132 @@
  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 value; values that are commented out
  12
+# serve to show the default value.
  13
+
  14
+import sys
  15
+
  16
+# If your extensions are in another directory, add it here.
  17
+#sys.path.append('some/directory')
  18
+
  19
+# General configuration
  20
+# ---------------------
  21
+
  22
+# Add any Sphinx extension module names here, as strings. They can be extensions
  23
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
  24
+#extensions = []
  25
+
  26
+# Add any paths that contain templates here, relative to this directory.
  27
+templates_path = []
  28
+
  29
+# The suffix of source filenames.
  30
+source_suffix = '.txt'
  31
+
  32
+# The master toctree document.
  33
+master_doc = 'index'
  34
+
  35
+# General substitutions.
  36
+project = 'Django'
  37
+copyright = '2008, Django Software Foundation'
  38
+
  39
+# The default replacements for |version| and |release|, also used in various
  40
+# other places throughout the built documents.
  41
+#
  42
+# The short X.Y version.
  43
+version = '$LastChangedRevision$'.split()[1]
  44
+# The full version, including alpha/beta/rc tags.
  45
+release = version
  46
+
  47
+# There are two options for replacing |today|: either, you set today to some
  48
+# non-false value, then it is used:
  49
+#today = ''
  50
+# Else, today_fmt is used as the format for a strftime call.
  51
+today_fmt = '%B %d, %Y'
  52
+
  53
+# List of documents that shouldn't be included in the build.
  54
+#unused_docs = []
  55
+
  56
+# If true, '()' will be appended to :func: etc. cross-reference text.
  57
+add_function_parentheses = True
  58
+
  59
+# If true, the current module name will be prepended to all description
  60
+# unit titles (such as .. function::).
  61
+add_module_names = False
  62
+
  63
+# If true, sectionauthor and moduleauthor directives will be shown in the
  64
+# output. They are ignored by default.
  65
+show_authors = False
  66
+
  67
+# The name of the Pygments (syntax highlighting) style to use.
  68
+pygments_style = 'sphinx'
  69
+
  70
+
  71
+# Options for HTML output
  72
+# -----------------------
  73
+
  74
+# The style sheet to use for HTML and HTML Help pages. A file of that name
  75
+# must exist either in Sphinx' static/ path, or in one of the custom paths
  76
+# given in html_static_path.
  77
+html_style = 'default.css'
  78
+
  79
+# Add any paths that contain custom static files (such as style sheets) here,
  80
+# relative to this directory. They are copied after the builtin static files,
  81
+# so a file named "default.css" will overwrite the builtin "default.css".
  82
+html_static_path = []
  83
+
  84
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  85
+# using the given strftime format.
  86
+html_last_updated_fmt = '%b %d, %Y'
  87
+
  88
+# If true, SmartyPants will be used to convert quotes and dashes to
  89
+# typographically correct entities.
  90
+html_use_smartypants = True
  91
+
  92
+# Content template for the index page.
  93
+#html_index = ''
  94
+
  95
+# Custom sidebar templates, maps document names to template names.
  96
+#html_sidebars = {}
  97
+
  98
+# Additional templates that should be rendered to pages, maps page names to
  99
+# template names.
  100
+#html_additional_pages = {}
  101
+
  102
+# If false, no module index is generated.
  103
+#html_use_modindex = True
  104
+
  105
+# If true, the reST sources are included in the HTML build as _sources/<name>.
  106
+html_copy_source = True
  107
+
  108
+# Output file base name for HTML help builder.
  109
+htmlhelp_basename = 'Djangodoc'
  110
+
  111
+
  112
+# Options for LaTeX output
  113
+# ------------------------
  114
+
  115
+# The paper size ('letter' or 'a4').
  116
+#latex_paper_size = 'letter'
  117
+
  118
+# The font size ('10pt', '11pt' or '12pt').
  119
+#latex_font_size = '10pt'
  120
+
  121
+# Grouping the document tree into LaTeX files. List of tuples
  122
+# (source start file, target name, title, author, document class [howto/manual]).
  123
+#latex_documents = []
  124
+
  125
+# Additional stuff for the LaTeX preamble.
  126
+#latex_preamble = ''
  127
+
  128
+# Documents to append as an appendix to all manuals.
  129
+#latex_appendices = []
  130
+
  131
+# If false, no module index is generated.
  132
+#latex_use_modindex = True
128  docs/index.txt
... ...
@@ -0,0 +1,128 @@
  1
+====================
  2
+Django Documentation
  3
+====================
  4
+
  5
+The essential documentation
  6
+===========================
  7
+
  8
+If you're new to Django, make sure to read the following documentation in
  9
+order.. The rest (in the "reference" section below) can be ready in any order as
  10
+you need various functionality.
  11
+
  12
+.. toctree::
  13
+   :maxdepth: 1
  14
+   
  15
+   overview
  16
+   install
  17
+   tutorial01
  18
+   tutorial02
  19
+   tutorial03
  20
+   tutorial04
  21
+   faq
  22
+   documentation
  23
+   
  24
+Reference
  25
+=========
  26
+
  27
+.. toctree::
  28
+   :maxdepth: 1
  29
+   
  30
+   django-admin
  31
+   model-api
  32
+   db-api
  33
+   transactions
  34
+   templates
  35
+   templates_python
  36
+   newforms
  37
+   modelforms
  38
+   testing
  39
+   sessions
  40
+   cache
  41
+   settings
  42
+   url_dispatch
  43
+   request_response
  44
+   generic_views
  45
+   authentication
  46
+   shortcuts
  47
+   unicode
  48
+   pagination
  49
+   serialization
  50
+   i18n
  51
+   middleware
  52
+   custom_model_fields
  53
+   databases
  54
+   
  55
+``django.contrib`` add-ons
  56
+--------------------------
  57
+
  58
+.. toctree::
  59
+   :maxdepth: 1
  60
+   
  61
+   add_ons
  62
+   contenttypes
  63
+   csrf
  64
+   databrowse
  65
+   flatpages
  66
+   form_preview
  67
+   form_wizard
  68
+   localflavor
  69
+   redirects
  70
+   sites
  71
+   sitemaps
  72
+   syndication_feeds
  73
+   webdesign
  74
+   
  75
+Deployment
  76
+----------
  77
+
  78
+.. toctree::
  79
+   :maxdepth: 1
  80
+
  81
+   modpython
  82
+   fastcgi
  83
+    
  84
+Solving specific problems
  85
+-------------------------
  86
+
  87
+.. toctree::
  88
+   :maxdepth: 1
  89
+
  90
+   apache_auth
  91
+   static_files
  92
+   email
  93
+   legacy_databases
  94
+   outputting_pdf
  95
+   outputting_csv
  96
+    
  97
+Et cetera
  98
+---------
  99
+
  100
+.. toctree::
  101
+   :maxdepth: 1
  102
+
  103
+   design_philosophies
  104
+   contributing
  105
+   admin_css
  106
+   api_stability
  107
+
  108
+Release notes
  109
+-------------
  110
+
  111
+.. toctree::
  112
+   :maxdepth: 1
  113
+
  114
+   release_notes_0.96
  115
+   release_notes_0.95
  116
+
  117
+Also see the list of `backwards-incompatible changes`__ for changes made between
  118
+releases.
  119
+
  120
+__ http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
  121
+
  122
+Indices and tables
  123
+==================
  124
+
  125
+* :ref:`genindex`
  126
+* :ref:`modindex`
  127
+* :ref:`search`
  128
+

0 notes on commit 7dd4be5

Please sign in to comment.
Something went wrong with that request. Please try again.