summaryrefslogtreecommitdiff
path: root/docs/narr/project.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2010-11-04 21:13:54 -0400
committerChris McDonough <chrism@plope.com>2010-11-04 21:13:54 -0400
commitfb30035ec15d56ac93362160e08f0ffbbfdd1212 (patch)
tree520aee3a005ba7c696bcadeea8139a452aa3c1a5 /docs/narr/project.rst
parenta2ec85f74c0cdbfd787d8fc452bd095b18b4f6b3 (diff)
downloadpyramid-fb30035ec15d56ac93362160e08f0ffbbfdd1212.tar.gz
pyramid-fb30035ec15d56ac93362160e08f0ffbbfdd1212.tar.bz2
pyramid-fb30035ec15d56ac93362160e08f0ffbbfdd1212.zip
- Move static dir from pkg/templates/ to /pkg/ in pyramid_* paster templates.
Diffstat (limited to 'docs/narr/project.rst')
-rw-r--r--docs/narr/project.rst51
1 files changed, 25 insertions, 26 deletions
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index 25e607174..15b9bfde5 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -437,18 +437,18 @@ share a similar structure.
The ``MyProject`` project we've generated has the following directory
structure::
- MyProject
+ MyProject/
|-- CHANGES.txt
|-- development.ini
|-- myproject
| |-- __init__.py
| |-- models.py
+ | |-- static
+ | | |-- favicon.ico
+ | | |-- logo.png
+ | | `-- pylons.css
| |-- templates
- | | |-- mytemplate.pt
- | | `-- static
- | | |-- favicon.ico
- | | |-- logo.png
- | | `-- pylons.css
+ | | `-- mytemplate.pt
| |-- tests.py
| `-- views.py
|-- README.txt
@@ -668,15 +668,14 @@ tarball to other people who want to use your application.
.. warning::
- By default, ``setup.py sdist`` does not place non-Python-source
- files in generated tarballs. This means, in this case, that the
- ``templates/mytemplate.pt`` file and the files in the
- ``templates/static`` directory are not packaged in the tarball. To
- allow this to happen, check all the files that you'd like to be
- distributed along with your application's Python files into a
- version control system such as Subversion. After you do this, when
- you rerun ``setup.py sdist``, all files checked into the version
- control system will be included in the tarball.
+ By default, ``setup.py sdist`` does not place non-Python-source files in
+ generated tarballs. This means, in this case, that the
+ ``templates/mytemplate.pt`` file and the files in the ``static`` directory
+ are not packaged in the tarball. To allow this to happen, check all the
+ files that you'd like to be distributed along with your application's
+ Python files into a version control system such as Subversion. After you
+ do this, when you rerun ``setup.py sdist``, all files checked into the
+ version control system will be included in the tarball.
``setup.cfg``
~~~~~~~~~~~~~
@@ -764,8 +763,8 @@ also informs Python that the directory which contains it is a *package*.
it actually points to is a :term:`Chameleon` ZPT template file.
Line 15 registers a static view, which will serve up the files from the
- ``mypackage:templates/static`` :term:`resource specification` (the
- ``templates/static`` directory of the ``mypackage`` package).
+ ``mypackage:static`` :term:`resource specification` (the ``static``
+ directory of the ``mypackage`` package).
Line 17 returns a :term:`WSGI` application to the caller of the function
(Paste).
@@ -844,6 +843,15 @@ make any assumption about which sort of datastore you'll want to use,
so the sample application uses an instance of
:class:`myproject.models.MyModel` to represent the root.
+``static``
+~~~~~~~~~~~~~~~~~~~~
+
+This directory contains static resources which support the
+``mytemplate.pt`` template. It includes CSS and images.
+
+.. index::
+ single: tests.py
+
``templates/mytemplate.pt``
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -857,15 +865,6 @@ 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`.
-``templates/static``
-~~~~~~~~~~~~~~~~~~~~
-
-This directory contains static resources which support the
-``mytemplate.pt`` template. It includes CSS and images.
-
-.. index::
- single: tests.py
-
``tests.py``
~~~~~~~~~~~~