summaryrefslogtreecommitdiff
path: root/repoze/bfg/push.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2008-07-16 22:12:03 +0000
committerChris McDonough <chrism@agendaless.com>2008-07-16 22:12:03 +0000
commit8b169d338e1ea6d07bc3cd0c9ff0b0ae91c56708 (patch)
treeba476bfbc868a2b5f202fe79d8b36b21290e6351 /repoze/bfg/push.py
parent80e4cf02ffd6f1e6b1c140dc2235424e7c1a276f (diff)
downloadpyramid-8b169d338e1ea6d07bc3cd0c9ff0b0ae91c56708.tar.gz
pyramid-8b169d338e1ea6d07bc3cd0c9ff0b0ae91c56708.tar.bz2
pyramid-8b169d338e1ea6d07bc3cd0c9ff0b0ae91c56708.zip
Doc tweaks.
Diffstat (limited to 'repoze/bfg/push.py')
-rw-r--r--repoze/bfg/push.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/repoze/bfg/push.py b/repoze/bfg/push.py
index 205c7f26e..49b9cda27 100644
--- a/repoze/bfg/push.py
+++ b/repoze/bfg/push.py
@@ -2,13 +2,19 @@ import os.path
from repoze.bfg.template import render_template
class pushpage(object):
- """ Decorator for functions which return template namespaces.
+ """ Decorator for functions which return ZPT template namespaces.
- E.g.:
+ E.g.::
@pushpage('www/my_template.pt')
def my_view(context, request):
return {'a': 1, 'b': ()}
+
+ Equates to::
+
+ def my_view(context, request):
+ return render_template('www/my_template.pt', a=1, b=())
+
"""
def __init__(self, template):
self.template = template