From 94b88987fd4f742538ccf43f5789e9c6463bca0e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 2 Nov 2010 03:35:17 -0400 Subject: - 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"). --- docs/narr/templates.rst | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'docs/narr/templates.rst') 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}, -- cgit v1.2.3