diff options
| author | Michael Merickel <michael@merickel.org> | 2013-09-06 00:02:46 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2013-09-06 00:22:24 -0500 |
| commit | 404b28ba2efb02d93777a3e01fd602c96af8c077 (patch) | |
| tree | b7a29799cd95b209dde60f903ac42bb5865cf1d4 /docs/tutorials/wiki2/basiclayout.rst | |
| parent | ac681bc83778443bcb70b9c1ea370368044614fb (diff) | |
| download | pyramid-404b28ba2efb02d93777a3e01fd602c96af8c077.tar.gz pyramid-404b28ba2efb02d93777a3e01fd602c96af8c077.tar.bz2 pyramid-404b28ba2efb02d93777a3e01fd602c96af8c077.zip | |
update the code in the wiki and wiki2 tutorials to use pyramid_chameleon
Diffstat (limited to 'docs/tutorials/wiki2/basiclayout.rst')
| -rw-r--r-- | docs/tutorials/wiki2/basiclayout.rst | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst index 0193afab4..c8e6723b3 100644 --- a/docs/tutorials/wiki2/basiclayout.rst +++ b/docs/tutorials/wiki2/basiclayout.rst @@ -82,11 +82,18 @@ dictionary of settings parsed from the ``.ini`` file, which contains deployment-related values such as ``pyramid.reload_templates``, ``db_string``, etc. +Next, include :term:`Chameleon` templating bindings so that we can use +renderers with the ``.pt`` extension within our project. + + .. literalinclude:: src/basiclayout/tutorial/__init__.py + :lines: 17 + :language: py + ``main`` now calls :meth:`pyramid.config.Configurator.add_static_view` with two arguments: ``static`` (the name), and ``static`` (the path): .. literalinclude:: src/basiclayout/tutorial/__init__.py - :lines: 17 + :lines: 18 :language: py This registers a static resource view which will match any URL that starts @@ -104,7 +111,7 @@ via the :meth:`pyramid.config.Configurator.add_route` method that will be used when the URL is ``/``: .. literalinclude:: src/basiclayout/tutorial/__init__.py - :lines: 18 + :lines: 19 :language: py Since this route has a ``pattern`` equalling ``/`` it is the route that will @@ -118,7 +125,7 @@ view configuration will be registered, which will allow one of our application URLs to be mapped to some code. .. literalinclude:: src/basiclayout/tutorial/__init__.py - :lines: 19 + :lines: 20 :language: py Finally, ``main`` is finished configuring things, so it uses the @@ -126,7 +133,7 @@ Finally, ``main`` is finished configuring things, so it uses the :term:`WSGI` application: .. literalinclude:: src/basiclayout/tutorial/__init__.py - :lines: 20 + :lines: 21 :language: py View Declarations via ``views.py`` |
