diff options
| author | Karl O. Pinc <kop@meme.com> | 2013-10-05 00:37:09 -0500 |
|---|---|---|
| committer | Karl O. Pinc <kop@meme.com> | 2013-10-05 00:37:09 -0500 |
| commit | 1f7a00346411033d935bf931c206b585353f8be4 (patch) | |
| tree | d54dfcf6870ee086e5dee1a470650d7a7a69abc8 /docs/narr/introduction.rst | |
| parent | 9951556030aeed07978472f59b7843273bcb84a8 (diff) | |
| download | pyramid-1f7a00346411033d935bf931c206b585353f8be4.tar.gz pyramid-1f7a00346411033d935bf931c206b585353f8be4.tar.bz2 pyramid-1f7a00346411033d935bf931c206b585353f8be4.zip | |
Docs: Link from renderer narrative docs to example render_to_response call, and index the example.
More fully explain the 2 examples, one with render_to_response call
and one without.
Diffstat (limited to 'docs/narr/introduction.rst')
| -rw-r--r-- | docs/narr/introduction.rst | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/narr/introduction.rst b/docs/narr/introduction.rst index 032f4be6b..8c2acf95c 100644 --- a/docs/narr/introduction.rst +++ b/docs/narr/introduction.rst @@ -321,7 +321,14 @@ assertion instead that the view returns "the right stuff" in the dictionary it returns. You can write "real" unit tests instead of functionally testing all of your views. -For example, instead of: +.. index:: + pair: renderer; explicitly calling + pair: view renderer; explictly calling + +.. _example_render_to_response_call: + +For example, instead of returning a ``Response`` object from a +``render_to_response`` call: .. code-block:: python :linenos: @@ -332,7 +339,7 @@ For example, instead of: return render_to_response('myapp:templates/mytemplate.pt', {'a':1}, request=request) -You can do this: +You can return a Python dictionary: .. code-block:: python :linenos: |
