summaryrefslogtreecommitdiff
path: root/docs/tutorials
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2008-09-26 06:42:53 +0000
committerChris McDonough <chrism@agendaless.com>2008-09-26 06:42:53 +0000
commit01a6e567a20096f6033cc603667f4e900d2a44c3 (patch)
treea87431383a63dbafbb5cccdfa7679b9187bdfc29 /docs/tutorials
parent26216e5526ca56d886d2348f9e1f09b86622aa72 (diff)
downloadpyramid-01a6e567a20096f6033cc603667f4e900d2a44c3.tar.gz
pyramid-01a6e567a20096f6033cc603667f4e900d2a44c3.tar.bz2
pyramid-01a6e567a20096f6033cc603667f4e900d2a44c3.zip
Move to Chameleon.
Diffstat (limited to 'docs/tutorials')
-rw-r--r--docs/tutorials/cmf/skins.rst8
-rw-r--r--docs/tutorials/lxmlgraph/step03.rst17
-rw-r--r--docs/tutorials/lxmlgraph/step03/myapp/views.py4
-rw-r--r--docs/tutorials/lxmlgraph/step04/myapp/views.py2
4 files changed, 16 insertions, 15 deletions
diff --git a/docs/tutorials/cmf/skins.rst b/docs/tutorials/cmf/skins.rst
index 2e444c4db..cbc28bfb5 100644
--- a/docs/tutorials/cmf/skins.rst
+++ b/docs/tutorials/cmf/skins.rst
@@ -14,9 +14,9 @@ particular skin to provide the site with additional features.
:mod:`repoze.bfg` itself has no such concept, and no package provides
a direct replacement, but bfg :term:`view` code combined with
differing :term:`request type` attributes can provide a good deal of
-the same sort of behavior. The `vudo.bfg <http://docs.vudo.me/>`_
-package is an attempt to allow directories on disk to represent
-collections of templates, each of which can be thought of as a minimal
-skin.
+the same sort of behavior. The `repoze.skins
+<http://svn.repoze.org/repoze.skins/>`_ package is an attempt to allow
+directories on disk to represent collections of templates, each of
+which can be thought of as a minimal skin.
diff --git a/docs/tutorials/lxmlgraph/step03.rst b/docs/tutorials/lxmlgraph/step03.rst
index 9edc77af3..0f54f8761 100644
--- a/docs/tutorials/lxmlgraph/step03.rst
+++ b/docs/tutorials/lxmlgraph/step03.rst
@@ -52,7 +52,7 @@ Also add a function in ``views.py`` that looks like the following:
.. code-block:: python
:linenos:
- from repoze.bfg.template import render_template_to_response
+ from repoze.bfg.chameleon_zpt import render_template_to_response
def zpt_view(context, request):
return render_template_to_response('templates/default.pt',
name=context.__name__,
@@ -61,8 +61,8 @@ Also add a function in ``views.py`` that looks like the following:
This function is relatively simple:
#. Line 1 imports a :mod:`repoze.bfg` function that renders ZPT
- templates to a response. :mod:`repoze.bfg` uses the ``z3c.pt`` ZPT
- engine.
+ templates to a response. :mod:`repoze.bfg` uses the
+ :term:`chameleon.zpt` ZPT engine.
#. Line 2, like our other view functions, gets passed a ``context``
(the current hop in the URL) and WebOb ``request`` object.
@@ -92,10 +92,11 @@ Life is better with templating:
``render_template_to_response``.
#. Line 6 looks interesting. It uses the ``node`` that we passed in
- via ``render_template_to_response``. Since ``z3c.pt`` uses Python
- as its expession language, we can put anything Python-legal between
- the braces. And since ``node`` is an ``lxml`` ``Element`` object,
- we just ask for its ``.tag``, like regular Python ``lxml`` code.
+ via ``render_template_to_response``. Since :term:`chameleon.zpt`
+ uses Python as its expession language, we can put anything
+ Python-legal between the braces. And since ``node`` is an ``lxml``
+ ``Element`` object, we just ask for its ``.tag``, like regular
+ Python ``lxml`` code.
Viewing the ZPT
------------------
@@ -119,7 +120,7 @@ model using the ZPT templating language.
XSLT Templates
-====================
+==============
So that's the ZPT way of rendering HTML for an XML document. We can
additonally use XSLT to do templating. How might XSLT look?
diff --git a/docs/tutorials/lxmlgraph/step03/myapp/views.py b/docs/tutorials/lxmlgraph/step03/myapp/views.py
index 0ac33ba83..6eb4e376c 100644
--- a/docs/tutorials/lxmlgraph/step03/myapp/views.py
+++ b/docs/tutorials/lxmlgraph/step03/myapp/views.py
@@ -1,5 +1,5 @@
-from repoze.bfg.template import render_template_to_response
-from repoze.bfg.template import render_transform_to_response
+from repoze.bfg.chameleon_zpt import render_template_to_response
+from repoze.bfg.chameleon_zpt import render_transform_to_response
def zpt_view(context, request):
return render_template_to_response("templates/default.pt",
diff --git a/docs/tutorials/lxmlgraph/step04/myapp/views.py b/docs/tutorials/lxmlgraph/step04/myapp/views.py
index fd8650e14..f079cea8c 100644
--- a/docs/tutorials/lxmlgraph/step04/myapp/views.py
+++ b/docs/tutorials/lxmlgraph/step04/myapp/views.py
@@ -1,4 +1,4 @@
-from repoze.bfg.template import render_transform_to_response
+from repoze.bfg.xslt import render_transform_to_response
# Some constants
XML_NAMESPACE='http://www.w3.org/XML/1998/namespace'