summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/firstapp.rst7
-rw-r--r--docs/narr/project.rst82
-rw-r--r--docs/narr/startup.rst4
-rw-r--r--docs/narr/templates.rst4
4 files changed, 44 insertions, 53 deletions
diff --git a/docs/narr/firstapp.rst b/docs/narr/firstapp.rst
index ea7134a3e..f5adad905 100644
--- a/docs/narr/firstapp.rst
+++ b/docs/narr/firstapp.rst
@@ -7,13 +7,6 @@ In this chapter, we will walk through the creation of a tiny :app:`Pyramid`
application. After we're finished creating the application, we'll explain in
more detail how it works.
-.. note::
-
- If you're a "theory-first" kind of person, you might choose to read
- :ref:`urldispatch_chapter` and :ref:`views_chapter` before diving into
- the code that follows, but it's not necessary if -- like many programmers
- -- you're willing to "go with the flow".
-
.. _helloworld_imperative:
Hello World, Goodbye World
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index c076c67ac..4edff1664 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -137,16 +137,11 @@ project we name ``MyProject``:
name during ``paster create`` by adding the project name to the
command line, e.g. ``paster create -t pyramid_starter MyProject``.
-.. note:: You may encounter an error when using ``paster create``
- if a dependent Python package is not installed. This will
- result in a traceback ending in:
-
- .. code-block:: text
-
- pkg_resources.DistributionNotFound: <package name>
-
- Simply run ``bin/easy_install``, with the missing package
- name from the error message, to work around this issue.
+.. note:: You may encounter an error when using ``paster create`` if a
+ dependent Python package is not installed. This will result in a traceback
+ ending in ``pkg_resources.DistributionNotFound: <package name>``.
+ Simply run ``bin/easy_install``, with the missing package name from the
+ error message to work around this issue.
As a result of invoking the ``paster create`` command, a project is created
in a directory named ``MyProject``. That directory is a :term:`project`
@@ -325,37 +320,36 @@ unconditionally.
[chrism@vitaminf shellenv]$ ../bin/paster pshell --disable-ipython \
development.ini MyProject
-.. warning::
+You should always use a section name argument that refers to the actual
+``app`` section within the Paste configuration file that points at your
+:app:`Pyramid` application *without any middleware wrapping*. In particular,
+a section name is inappropriate as the second argument to ``pshell`` if the
+configuration section it names is a ``pipeline`` rather than an ``app``. For
+example, if you have the following ``.ini`` file content:
+
+.. latexbroken?
- You should always use a section name argument that refers to the actual
- ``app`` section within the Paste configuration file that points at your
- :app:`Pyramid` application *without any middleware wrapping*. In
- particular, a section name is inappropriate as the second argument to
- ``pshell`` if the configuration section it names is a ``pipeline`` rather
- than an ``app``. For example, if you have the following ``.ini`` file
- content:
-
- .. code-block:: guess
- :linenos:
-
- [app:MyProject]
- use = egg:MyProject
- reload_templates = true
- debug_authorization = false
- debug_notfound = false
- debug_templates = true
- default_locale_name = en
-
- [pipeline:main]
- pipeline =
- egg:WebError#evalerror
- MyProject
-
- Use ``MyProject`` instead of ``main`` as the section name argument to
- ``pshell`` against the above ``.ini`` file (e.g. ``paster pshell
- development.ini MyProject``). If you use ``main`` instead, an error will
- occur. Use the most specific reference to your application within the
- ``.ini`` file possible as the section name argument.
+.. code-block:: ini
+ :linenos:
+
+ [app:MyProject]
+ use = egg:MyProject
+ reload_templates = true
+ debug_authorization = false
+ debug_notfound = false
+ debug_templates = true
+ default_locale_name = en
+
+ [pipeline:main]
+ pipeline =
+ egg:WebError#evalerror
+ MyProject
+
+Use ``MyProject`` instead of ``main`` as the section name argument to
+``pshell`` against the above ``.ini`` file (e.g. ``paster pshell
+development.ini MyProject``). If you use ``main`` instead, an error will
+occur. Use the most specific reference to your application within the
+``.ini`` file possible as the section name argument.
Press ``Ctrl-D`` to exit the interactive shell (or ``Ctrl-Z`` on Windows).
@@ -511,8 +505,8 @@ describe, run, and test your application.
``setup.py``.
#. ``MANIFEST.in`` is a :term:`distutils` "manifest" file, naming which files
- should be included in a source distribution of the package when ``python
- setup.py sdist`` is run.
+ should be included in a source distribution of the package when ``python
+ setup.py sdist`` is run.
#. ``setup.py`` is the file you'll use to test and distribute your
application. It is a standard :term:`setuptools` ``setup.py`` file.
@@ -532,8 +526,10 @@ serve``, as well as the deployment settings provided to that application.
The generated ``development.ini`` file looks like so:
+.. latexbroken?
+
.. literalinclude:: MyProject/development.ini
- :language: guess
+ :language: ini
:linenos:
This file contains several "sections" including ``[app:MyProject]``,
diff --git a/docs/narr/startup.rst b/docs/narr/startup.rst
index f4655727c..351d3e63c 100644
--- a/docs/narr/startup.rst
+++ b/docs/narr/startup.rst
@@ -81,8 +81,10 @@ Here's a high-level time-ordered overview of what happens when you press
Our generated ``development.ini`` file looks like so:
+ .. latexbroken?
+
.. literalinclude:: MyProject/development.ini
- :language: guess
+ :language: ini
:linenos:
In this case, the ``myproject.__init__:main`` function referred to by the
diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst
index d6d9a4e3e..d37e9722b 100644
--- a/docs/narr/templates.rst
+++ b/docs/narr/templates.rst
@@ -744,8 +744,8 @@ look like:
<body>
<h1 class="title">Welcome to <code>${project}</code>, an
application generated by the <a
- href="http://docs.pylonsproject.org/projects/pyramid/dev/">pyramid</a> web
- application framework.</h1>
+ href="http://docs.pylonsproject.org/projects/pyramid/dev/"
+ >pyramid</a> web application framework.</h1>
</body>
</html>