summaryrefslogtreecommitdiff
path: root/docs/narr/project.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/narr/project.rst')
-rw-r--r--docs/narr/project.rst57
1 files changed, 17 insertions, 40 deletions
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index c1017b5c1..f0ee91164 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -8,13 +8,13 @@ As we saw in :ref:`firstapp_chapter`, it's possible to create a
convenient to use a *template* to generate a basic :app:`Pyramid`
:term:`project`.
-A project is a directory that contains at least one :term:`package`. You'll
-use a template to create a project, and you'll create your application logic
-within a package that lives inside the project. Even if your application is
-extremely simple, it is useful to place code that drives the application
-within a package, because a package is more easily extended with new code.
-An application that lives inside a package can also be distributed more
-easily than one which does not live within a package.
+A project is a directory that contains at least one Python :term:`package`.
+You'll use a template to create a project, and you'll create your application
+logic within a package that lives inside the project. Even if your
+application is extremely simple, it is useful to place code that drives the
+application within a package, because a package is more easily extended with
+new code. An application that lives inside a package can also be distributed
+more easily than one which does not live within a package.
:app:`Pyramid` comes with a variety of templates that you can use to generate
a project. Each template makes different configuration assumptions about
@@ -26,13 +26,9 @@ and so therefore they are often referred to as "paster templates".
.. index::
single: paster templates
single: pyramid_starter paster template
- single: pyramid_starter_zcml paster template
single: pyramid_zodb paster template
single: pyramid_alchemy paster template
single: pyramid_routesalchemy paster template
- single: pylons_minimal paster template
- single: pylons_basic paster template
- single: pylons_sqla paster template
.. _additional_paster_templates:
@@ -48,8 +44,6 @@ each other on a number of axes:
- the mechanism they use to map URLs to code (:term:`traversal` or :term:`URL
dispatch`).
-- the type of configuration used (:term:`ZCML` vs. imperative configuration).
-
- whether or not the ``pyramid_beaker`` library is relied upon as the
sessioning implementation (as opposed to no sessioning or default
sessioning).
@@ -59,10 +53,6 @@ The included templates are these:
``pyramid_starter``
URL mapping via :term:`traversal` and no persistence mechanism.
-``pyramid_starter_zcml``
- URL mapping via :term:`traversal` and no persistence mechanism, using
- :term:`ZCML` (declarative configuration).
-
``pyramid_zodb``
URL mapping via :term:`traversal` and persistence via :term:`ZODB`.
@@ -74,20 +64,6 @@ The included templates are these:
URL mapping via :term:`traversal` and persistence via
:term:`SQLAlchemy`
-``pylons_minimal``
- URL mapping via :term:`URL dispatch` and Pylons-style view handlers,
- minimal setup, uses ``pyramid_beaker`` as a sessioning implementation.
-
-``pylons_basic``
- URL mapping via :term:`URL dispatch` and Pylons-style view handlers, and
- some extra functionality, uses ``pyramid_beaker`` as a sessioning
- implementation.
-
-``pylons_sqla``
- URL mapping via :term:`URL dispatch` and Pylons-style view handlers, some
- extra functionality, and SQLAlchemy set up, uses ``pyramid_beaker`` as a
- sessioning implementation.
-
.. index::
single: creating a project
single: project
@@ -601,7 +577,7 @@ or influencing runtime behavior of a :app:`Pyramid` application. See
default 'application' (although it's actually a pipeline of middleware and an
application) run by ``paster serve`` when it is invoked against this
configuration file. The name ``main`` is a convention used by PasteDeploy
-signifying that it the default application.
+signifying that it is the default application.
The ``[server:main]`` section of the configuration file configures a WSGI
server which listens on TCP port 6543. It is configured to listen on all
@@ -705,7 +681,8 @@ who want to use your application.
be included in the tarball. If you don't use Subversion, and instead use
a different version control system, you may need to install a setuptools
add-on such as ``setuptools-git`` or ``setuptools-hg`` for this behavior
- to work properly.
+ to work properly. Alternatively, you can specify the non-Python-source
+ files by hand in a ``manifest template``, called ``MANIFEST.in`` by default.
``setup.cfg``
~~~~~~~~~~~~~
@@ -876,9 +853,6 @@ represent the root.
This directory contains static assets which support the ``mytemplate.pt``
template. It includes CSS and images.
-.. index::
- single: tests.py
-
``templates/mytemplate.pt``
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -892,6 +866,9 @@ Templates are accessed and used by view configurations and sometimes by view
functions themselves. See :ref:`templates_used_directly` and
:ref:`templates_used_as_renderers`.
+.. index::
+ single: tests.py
+
``tests.py``
~~~~~~~~~~~~
@@ -964,10 +941,10 @@ To this:
renderer='myproject:templates/mytemplate.pt')
You can then continue to add files to the ``views`` directory, and refer to
-views or handler classes/functions within those files via the dotted name
-passed as the first argument to ``add_view``. For example, if you added a
-file named ``anothermodule.py`` to the ``views`` subdirectory, and added a
-view callable named ``my_view`` to it:
+view classes or functions within those files via the dotted name passed as
+the first argument to ``add_view``. For example, if you added a file named
+``anothermodule.py`` to the ``views`` subdirectory, and added a view callable
+named ``my_view`` to it:
.. code-block:: python
:linenos: