diff options
| author | Malthe Borch <mborch@gmail.com> | 2009-08-24 17:21:10 +0000 |
|---|---|---|
| committer | Malthe Borch <mborch@gmail.com> | 2009-08-24 17:21:10 +0000 |
| commit | 241390d911639cb658bbbbbf1bf3d8c21e0c0270 (patch) | |
| tree | 7ebcc33709c8c715debf9b94e5157a1464df260c /docs/narr/project.rst | |
| parent | 45b545c377945812a83d926d11f1635d279069a6 (diff) | |
| download | pyramid-241390d911639cb658bbbbbf1bf3d8c21e0c0270.tar.gz pyramid-241390d911639cb658bbbbbf1bf3d8c21e0c0270.tar.bz2 pyramid-241390d911639cb658bbbbbf1bf3d8c21e0c0270.zip | |
Added ZCML directive to serve up static files from a directory.
Diffstat (limited to 'docs/narr/project.rst')
| -rw-r--r-- | docs/narr/project.rst | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/docs/narr/project.rst b/docs/narr/project.rst index e2fc69435..131a8ff48 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -565,10 +565,8 @@ registry`. It looks like so: ``.views.my_view`` could be replaced with ``myproject.views.my_view``. -#. Lines 11-15 register a view named ``static``. This view - declaration points at the ``static_view``, which is a view - implementation that serves static files from the filesystem for the - default application. +#. Lines 11-14 register a static view, which will register a view + which serves up the files from the static directory in the package. ``views.py`` ~~~~~~~~~~~~ @@ -582,13 +580,7 @@ in the model, and the response given back to a browser. #. Lines 1-2 import required functions. -#. Line 4 sets up a ``static_view`` which will be consulted when - visitors visit ``/static/<something>``. This view will serve up - CSS and images in our default application. This view is registered - in ``configure.zcml`` as the ``static`` view name for the class - ``MyModel`` (the root). - -#. Lines 6-9 provide the ``my_view`` that was registered as the view. +#. Lines 3-6 provide the ``my_view`` that was registered as the view. ``configure.zcml`` said that the default URL for instances that are of the class ``MyModel`` should run this ``my_view`` function. @@ -622,11 +614,6 @@ in the model, and the response given back to a browser. retrieve the template object without rendering it at all, for additional control. -.. note:: - - For more information about the ``static`` view helper function see - :ref:`static_resources_section`. - .. _modelspy_project_section: ``models.py`` |
