Commits

Stefan Scherfke committed 6b11617

Updated documentation.

  • Participants
  • Parent commits 3e4bae9

Comments (0)

Files changed (14)

File docs/Makefile

 PAPEROPT_letter = -D latex_paper_size=letter
 ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
 
-.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
 
 help:
 	@echo "Please use \`make <target>' where <target> is one of"
-	@echo "  html      to make standalone HTML files"
-	@echo "  dirhtml   to make HTML files named index.html in directories"
-	@echo "  pickle    to make pickle files"
-	@echo "  json      to make JSON files"
-	@echo "  htmlhelp  to make HTML files and a HTML help project"
-	@echo "  qthelp    to make HTML files and a qthelp project"
-	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
-	@echo "  changes   to make an overview of all changed/added/deprecated items"
-	@echo "  linkcheck to check all external links for integrity"
-	@echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
 
 clean:
 	-rm -rf $(BUILDDIR)/*
 	@echo
 	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
 
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
 pickle:
 	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
 	@echo
 	@echo "To view the help file:"
 	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/django-sphinxdoc.qhc"
 
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/django-sphinxdoc"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/django-sphinxdoc"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
 latex:
 	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
 	@echo
 	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
-	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
-	      "run these through (pdf)latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	make -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
 
 changes:
 	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes

File docs/autobuild.txt

 Auto-build JSON files on ``hg pull/push``
 =========================================
 
-If you use `Mercurial (hg) <http://selenic.com/mercurial/>`_ for the project you
-are documenting, you can automatically call ``sphinx-build`` each time you push
-or pull to the clone on your webserver (the same machine running your Django
-project).
+If you use `Mercurial (hg) <http://selenic.com/mercurial/>`_, you can update
+your documentation automatically each time you push to your web server (or if
+you pull from another server to your web server).
 
-You need two things to accomplish this:
-
-1. A script that performs the build
-2. Make ``hg`` call that script
-
-The build script
-----------------
-
-A good place for the script is the ``.hg/`` directory of your repository on the server. Change to that directory and create a file called ``makedoc``:
-
-.. sourcecode:: bash
-
-    #! /bin/bash
-
-    cd /path/to/your/repo
-    hg up
-    cd /path/to/your/repo/doc
-    make json
-
-Make ``hg`` call that script
-----------------------------
-
-Open ``.hg/hgrc`` in your favorite editor and add the following lines to it:
+To do that, open your repository’s ``.hg/hgrc`` in your favorite editor and add
+the following lines to it:
 
 .. sourcecode:: cfg
 
     [hooks]
-    changegroup = /path/to/your/repo/.hg/makedoc
+    changegroup = /path/to/your/python path/to/manage.py updatedoc -b <project>
     
-Done
-----
-
 Now, each time the repository is modified via a pull or push command, the
-documentation will be updated automatically.
+documentation on your Django site will be updated automatically.

File docs/change_appearance.txt

 ``pagination-bottom``
     Like the upper pagination bar, but also contains the build date.
     
-The ¶ sign after headings
--------------------------
+The following examples demonstrate how you can change the appearance of your
+documentation.
 
-To only show the headings’ ¶ sign, add something like this to your CSS:
+    
+The “¶” sign after headings
+---------------------------
+
+To only show the headings’ “¶” sign if you hover above the heading, add
+something like this to your CSS:
 
 .. sourcecode:: css
 
 --------------------------------
     
 Another style-problem for your site might be, that the Sphinx stuff starts with
-``h1`` as top level heading, but that your site uses ``h1`` for the site title
-and ``h2`` as top level content heading.
+``<h1>`` as top level heading, but that your site uses ``<h1>`` for the site
+title and ``<h2>`` as top level content heading.
 
-I haven’t found a way to modify Sphinx’ behavior and make it use ``h2``. If you
-won’t change your behavior either, you can just change the font sizes of the
-Sphinx headings, so that Sphinx’ ``h1`` matches your ``h2``, e.g.:
+I haven’t found a way to modify Sphinx’ behavior and make it use ``<h2>``. To
+work around this, you can just change the font sizes of the Sphinx headings, so
+that Sphinx’ ``<h1>`` matches your ``<h2>``:
 
 .. sourcecode:: css
 

File docs/conf.py

 # -*- coding: utf-8 -*-
 #
-# django-lastfm documentation build configuration file, created by
-# sphinx-quickstart on Fri Nov 27 10:35:57 2009.
+# django-sphinxdoc documentation build configuration file, created by
+# sphinx-quickstart on Fri Sep 10 23:12:48 2010.
 #
 # This file is execfile()d with the current directory set to its containing dir.
 #
 # serve to show the default.
 
 import sys, os
-# from django.conf import settings
-# settings.configure()
 
 # 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.append(os.path.abspath('.'))
-sys.path.append(os.path.abspath('../'))
+#sys.path.insert(0, os.path.abspath('.'))
 
 # -- General configuration -----------------------------------------------------
 
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
 # 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']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.coverage']
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
 source_suffix = '.txt'
 
 # The encoding of source files.
-#source_encoding = 'utf-8'
+#source_encoding = 'utf-8-sig'
 
 # The master toctree document.
 master_doc = 'index'
 
 # General information about the project.
 project = u'django-sphinxdoc'
-copyright = u'2009, Stefan Scherfke'
+copyright = u'2010, Stefan Scherfke'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
 # The short X.Y version.
-version = '0.2'
+version = '1.0'
 # The full version, including alpha/beta/rc tags.
-release = '0.2'
+release = '1.0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 # Else, today_fmt is used as the format for a strftime call.
 #today_fmt = '%B %d, %Y'
 
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directory, that shouldn't be searched
-# for source files.
-exclude_trees = ['_build']
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
 
 # The reST default role (used for this markup: `text`) to use for all documents.
 #default_role = None
 
 # -- Options for HTML output ---------------------------------------------------
 
-# The theme to use for HTML and HTML Help pages.  Major themes that come with
-# Sphinx are currently 'default' and 'sphinxdoc'.
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
 html_theme = 'default'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 #html_additional_pages = {}
 
 # If false, no module index is generated.
-#html_use_modindex = True
+#html_domain_indices = True
 
 # If false, no index is generated.
 #html_use_index = True
 # If true, links to the reST sources are added to the pages.
 #html_show_sourcelink = True
 
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
 # If true, an OpenSearch description file will be output, and all pages will
 # contain a <link> tag referring to it.  The value of this option must be the
 # base URL from which the finished HTML is served.
 #html_use_opensearch = ''
 
-# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = ''
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
 
 # Output file base name for HTML help builder.
 htmlhelp_basename = 'django-sphinxdocdoc'
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, documentclass [howto/manual]).
 latex_documents = [
-  ('index', 'django-sphinxdoc.tex', u'django-sphinxdoc Documentation',
+  ('ind', 'django-sphinxdoc.tex', u'django-sphinxdoc Documentation',
    u'Stefan Scherfke', 'manual'),
 ]
 
 # not chapters.
 #latex_use_parts = False
 
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
 # Additional stuff for the LaTeX preamble.
 #latex_preamble = ''
 
 #latex_appendices = []
 
 # If false, no module index is generated.
-#latex_use_modindex = True
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('ind', 'django-sphinxdoc', u'django-sphinxdoc Documentation',
+     [u'Stefan Scherfke'], 1)
+]
+
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {'http://docs.python.org/': None}

File docs/ref/admin.txt

+.. _ref-admin:
+
+Admin
+=====
+
+.. automodule:: sphinxdoc.admin
+    :members:

File docs/ref/forms.txt

+.. _ref-forms:
+
+Forms
+=====
+
+.. automodule:: sphinxdoc.forms
+    :members:

File docs/ref/index.txt

 .. toctree::
     :maxdepth: 1
     
-    templatetags
+    admin
+    forms
+    management
+    models
+    search_indexes
+    urls
+    validators
     views

File docs/ref/management.txt

+.. _ref-management:
+
+Management commands
+===================
+
+One management command is provided with this app.
+
+
+``updatedoc``
+-------------
+
+.. automodule:: sphinxdoc.management.commands.updatedoc
+
+    .. autoclass:: Command
+        :members: handle, build, delete_documents, import_files, update_haystack

File docs/ref/models.txt

+.. _ref-models:
+
+Models
+======
+
+.. automodule:: sphinxdoc.models
+    :members:

File docs/ref/search_indexes.txt

+.. _ref-search-indexes:
+
+Search Indexes
+==============
+
+.. automodule:: sphinxdoc.search_indexes
+    :members:

File docs/ref/templatetags.txt

-.. ref-templatetags:
-
-Template Tags
-=============

File docs/ref/urls.txt

+.. _ref-urls:
+
+URLs
+====
+
+.. automodule:: sphinxdoc.urls
+    :members:

File docs/ref/validators.txt

+.. _ref-validators:
+
+Validators
+==========
+
+.. automodule:: sphinxdoc.validators
+    :members:

File docs/ref/views.txt

 
 Views
 =====
+
+.. automodule:: sphinxdoc.views
+
+    .. autoclass:: ProjectSearchView
+        :members:
+    
+    .. autofunction:: documentation(request, slug, path)
+    
+    .. autofunction:: objects_inventory(request, slug, path)
+    
+    .. autofunction:: images(request, slug, path)
+    
+    .. autofunction:: source(request, slug, path)