diff options
| author | Chris McDonough <chrism@plope.com> | 2010-11-02 03:35:17 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-11-02 03:35:17 -0400 |
| commit | 94b88987fd4f742538ccf43f5789e9c6463bca0e (patch) | |
| tree | 7fcd2c8bc79c36da71b8f580d036fc834d2ffa3f /docs/narr/templates.rst | |
| parent | 8129f9ea73ac1c1fcacc3e9ccdd42a12994e7255 (diff) | |
| download | pyramid-94b88987fd4f742538ccf43f5789e9c6463bca0e.tar.gz pyramid-94b88987fd4f742538ccf43f5789e9c6463bca0e.tar.bz2 pyramid-94b88987fd4f742538ccf43f5789e9c6463bca0e.zip | |
- Remove references to 'WebOb' Response and just call it 'Response', and note
that it is imported from pyramid. API docs can mention its inheritance from
webob (aka "Provide a webob.Response class facade for forward compat").
Diffstat (limited to 'docs/narr/templates.rst')
| -rw-r--r-- | docs/narr/templates.rst | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst index 736e6a185..efe631f3a 100644 --- a/docs/narr/templates.rst +++ b/docs/narr/templates.rst @@ -130,7 +130,7 @@ the body of the response: :linenos: from pyramid.renderers import render - from webob import Response + from pyramid.response import Response def sample_view(request): result = render('mypackage:templates/foo.pt', @@ -140,12 +140,11 @@ the body of the response: return response Because :term:`view callable` functions are typically the only code in -:mod:`pyramid` that need to know anything about templates, and -because view functions are very simple Python, you can use whatever -templating system you're most comfortable with within -:mod:`pyramid`. Install the templating system, import its API -functions into your views module, use those APIs to generate a string, -then return that string as the body of a :term:`WebOb` +:mod:`pyramid` that need to know anything about templates, and because view +functions are very simple Python, you can use whatever templating system you're +most comfortable with within :mod:`pyramid`. Install the templating system, +import its API functions into your views module, use those APIs to generate a +string, then return that string as the body of a :mod:`pyramid` :term:`Response` object. For example, here's an example of using raw `Mako @@ -157,7 +156,7 @@ For example, here's an example of using raw `Mako :linenos: from mako.template import Template - from webob import Response + from pyramid.response import Response def make_view(request): template = Template(filename='/templates/template.mak') @@ -215,7 +214,7 @@ of :func:`pyramid.renderers.render` (a string): :linenos: from pyramid.renderers import render - from webob import Response + from pyramid.response import Response def sample_view(request): result = render('mypackage:templates/foo.pt', {'foo':1, 'bar':2}, |
