summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2008-07-18 04:29:15 +0000
committerChris McDonough <chrism@agendaless.com>2008-07-18 04:29:15 +0000
commit9cafa36c9b9764f9f51693dded96fcbb40396246 (patch)
tree392d527ca206b192a169ea64dcd2952441e06f89 /docs
parent9bf064f1aa7574b0f52f147061f0ab81e48b1a81 (diff)
downloadpyramid-9cafa36c9b9764f9f51693dded96fcbb40396246.tar.gz
pyramid-9cafa36c9b9764f9f51693dded96fcbb40396246.tar.bz2
pyramid-9cafa36c9b9764f9f51693dded96fcbb40396246.zip
Placeholder.
Diffstat (limited to 'docs')
-rw-r--r--docs/index.rst1
-rw-r--r--docs/narr/templates.rst35
2 files changed, 36 insertions, 0 deletions
diff --git a/docs/index.rst b/docs/index.rst
index d6379048f..938520c73 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -14,6 +14,7 @@ Narrative documentation in chapter form explaining how to use
narr/introduction
narr/views
+ narr/templates
narr/security
API documentation
diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst
new file mode 100644
index 000000000..9f161855d
--- /dev/null
+++ b/docs/narr/templates.rst
@@ -0,0 +1,35 @@
+Templates
+=========
+
+A *template* is a file on disk which can be used to render data
+provided by a *view* in a form that is meaningful for a particular
+*context*.
+
+The ``repoze.bfg`` Default Templating Systems
+---------------------------------------------
+
+``repoze.bfg`` uses the `z3c.pt
+<http://pypi.python.org/pypi/z3c.pt>`_
+templating engine as its default
+engine. This templating engine
+complies with the `Zope Page
+Template
+<http://wiki.zope.org/ZPT/FrontPage>`_
+template specification.
+
+``repoze.bfg`` also allows `XSL
+Templates
+<http://www.w3.org/TR/xslt>`_
+to be used for templating.
+
+
+Rendering a ``z3c.pt`` Template
+-------------------------------
+
+Given a template named ``foo.html``
+in a directory in your application
+named "templates", you can render
+the template in a view via::
+
+ from repoze.bfg.template import render template
+ render_template('templates/foo.html', foo=1, bar=2)