summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py31
-rw-r--r--docs/glossary.rst2
-rw-r--r--docs/narr/introduction.rst2
-rwxr-xr-xdocs/remake2
-rw-r--r--docs/tutorials/wiki2/authorization.rst2
-rw-r--r--docs/tutorials/wiki2/basiclayout.rst2
-rw-r--r--docs/tutorials/wiki2/definingmodels.rst2
-rw-r--r--docs/tutorials/wiki2/installation.rst2
8 files changed, 25 insertions, 20 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 3dc72d8ae..048b7ce78 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -26,6 +26,7 @@ from sphinx.writers.latex import LaTeXTranslator
from docutils import nodes
from docutils import utils
+
def raw(*arg):
raise nodes.SkipNode
TextTranslator.visit_raw = raw
@@ -97,7 +98,7 @@ today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
-exclude_patterns = ['_themes/README.rst',]
+exclude_patterns = ['_themes/README.rst', ]
# List of directories, relative to source directories, that shouldn't be searched
# for source files.
@@ -129,14 +130,12 @@ if book:
# -----------------------
# Add and use Pylons theme
-if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers
+if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers
from subprocess import call, Popen, PIPE
p = Popen('which git', shell=True, stdout=PIPE)
-
cwd = os.getcwd()
_themes = os.path.join(cwd, '_themes')
- p = Popen('which git', shell=True, stdout=PIPE)
git = p.stdout.read().strip()
if not os.listdir(_themes):
call([git, 'submodule', '--init'])
@@ -373,10 +372,10 @@ _PREAMBLE = r"""
latex_elements = {
'preamble': _PREAMBLE,
- 'wrapperclass':'book',
- 'date':'',
- 'releasename':'Version',
- 'title':r'The Pyramid Web Application \newline Development Framework',
+ 'wrapperclass': 'book',
+ 'date': '',
+ 'releasename': 'Version',
+ 'title': r'The Pyramid Web Application \newline Development Framework',
# 'pointsize':'12pt', # uncomment for 12pt version
}
@@ -392,6 +391,7 @@ latex_elements = {
#paragraph 4
#subparagraph 5
+
def frontmatter(name, arguments, options, content, lineno,
content_offset, block_text, state, state_machine):
return [nodes.raw(
@@ -409,6 +409,7 @@ def frontmatter(name, arguments, options, content, lineno,
""",
format='latex')]
+
def mainmatter(name, arguments, options, content, lineno,
content_offset, block_text, state, state_machine):
return [nodes.raw(
@@ -428,11 +429,13 @@ def mainmatter(name, arguments, options, content, lineno,
""",
format='latex')]
+
def backmatter(name, arguments, options, content, lineno,
content_offset, block_text, state, state_machine):
return [nodes.raw('', '\\backmatter\n\\setcounter{secnumdepth}{-1}\n',
format='latex')]
+
def app_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
"""custom role for :app: marker, does nothing in particular except allow
:app:`Pyramid` to work (for later search and replace)."""
@@ -450,6 +453,7 @@ def setup(app):
app.add_directive('backmatter', backmatter, 1, (0, 0, 0))
app.connect('autodoc-process-signature', resig)
+
def resig(app, what, name, obj, options, signature, return_annotation):
""" Allow for preservation of ``@action_method`` decorated methods
in configurator """
@@ -476,10 +480,11 @@ def resig(app, what, name, obj, options, signature, return_annotation):
# -- Options for Epub output ---------------------------------------------------
# Bibliographic Dublin Core info.
-epub_title = 'The Pyramid Web Application Development Framework, Version 1.4'
+epub_title = 'The Pyramid Web Application Development Framework, Version %s' \
+ % release
epub_author = 'Chris McDonough'
epub_publisher = 'Agendaless Consulting'
-epub_copyright = '2008-2011'
+epub_copyright = '2008-%d' % datetime.datetime.now().year
# The language of the text. It defaults to the language option
# or en if the language is not set.
@@ -493,8 +498,8 @@ epub_scheme = 'ISBN'
epub_identifier = '0615445675'
# A unique identification for the text.
-epub_uid = 'The Pyramid Web Application Development Framework, Version 1.4'
-
+epub_uid = 'The Pyramid Web Application Development Framework, Version %s' \
+ % release
# HTML files that should be inserted before the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#epub_pre_files = []
@@ -506,7 +511,7 @@ epub_uid = 'The Pyramid Web Application Development Framework, Version 1.4'
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['_static/opensearch.xml', '_static/doctools.js',
'_static/jquery.js', '_static/searchtools.js', '_static/underscore.js',
- '_static/basic.css', 'search.html']
+ '_static/basic.css', 'search.html', '_static/websupport.js']
# The depth of the table of contents in toc.ncx.
diff --git a/docs/glossary.rst b/docs/glossary.rst
index 6620552f1..5b165db0a 100644
--- a/docs/glossary.rst
+++ b/docs/glossary.rst
@@ -921,7 +921,7 @@ Glossary
PyPy
PyPy is an "alternative implementation of the Python
- language":http://pypy.org/
+ language": http://pypy.org/
tween
A bit of code that sits between the Pyramid router's main request
diff --git a/docs/narr/introduction.rst b/docs/narr/introduction.rst
index b35c61720..956d7a177 100644
--- a/docs/narr/introduction.rst
+++ b/docs/narr/introduction.rst
@@ -101,7 +101,7 @@ frameworks for small and large applications is just false; a well-designed
framework should be able to be good at both. Pyramid strives to be that kind
of framework.
-To this end, Pyramid provides a set of features, that, combined, are unique
+To this end, Pyramid provides a set of features that, combined, are unique
amongst Python web frameworks. Lots of other frameworks contain some
combination of these features; Pyramid of course actually stole many of them
from those other frameworks. But Pyramid is the only one that has all of
diff --git a/docs/remake b/docs/remake
index eb818289f..6552716c8 100755
--- a/docs/remake
+++ b/docs/remake
@@ -1 +1 @@
-make clean html SPHINXBUILD=../env27/bin/sphinx-build
+make clean html SPHINXBUILD=../env/bin/sphinx-build
diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst
index d98fb87e4..cfbc8ca75 100644
--- a/docs/tutorials/wiki2/authorization.rst
+++ b/docs/tutorials/wiki2/authorization.rst
@@ -14,7 +14,7 @@ anyone with access to the server to view pages.
We will also add a login page and a logout link on all the
pages. The login page will be shown when a user is denied
-access to any of the views that require a permission, instead of
+access to any of the views that require permission, instead of
a default "403 Forbidden" page.
We will implement the access control with the following steps:
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst
index 763deaa32..e8874784c 100644
--- a/docs/tutorials/wiki2/basiclayout.rst
+++ b/docs/tutorials/wiki2/basiclayout.rst
@@ -97,7 +97,7 @@ with the prefix ``/static`` (by virtue of the first argument to
``add_static_view``). This will serve up static resources for us from within
the ``static`` directory of our ``tutorial`` package, in this case, via
``http://localhost:6543/static/`` and below (by virtue of the second argument
-to add_static_view). With this declaration, we're saying that any URL that
+to ``add_static_view``). With this declaration, we're saying that any URL that
starts with ``/static`` should go to the static view; any remainder of its
path (e.g. the ``/foo`` in ``/static/foo``) will be used to compose a path to
a static file resource, such as a CSS file.
diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst
index cfa80aa42..dca6238dd 100644
--- a/docs/tutorials/wiki2/definingmodels.rst
+++ b/docs/tutorials/wiki2/definingmodels.rst
@@ -31,7 +31,7 @@ following:
(The highlighted lines are the ones that need to be changed.)
-The first thing we've done is to do is remove the stock ``MyModel`` class
+The first thing we've done is remove the stock ``MyModel`` class
from the generated ``models.py`` file. The ``MyModel`` class is only a
sample and we're not going to use it.
diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst
index d4d5c0cce..9fa01d513 100644
--- a/docs/tutorials/wiki2/installation.rst
+++ b/docs/tutorials/wiki2/installation.rst
@@ -162,7 +162,7 @@ On Windows:
.. code-block:: text
- c:\pyramidtut\tutorial> ..\Scripts\nosetests --cover-package=tutorial ^
+ c:\pyramidtut\tutorial> ..\Scripts\nosetests --cover-package=tutorial \
--cover-erase --with-coverage
If successful, you will see output something like this::