diff options
| author | Chris McDonough <chrism@plope.com> | 2013-10-08 12:41:36 +0200 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2013-10-08 12:41:36 +0200 |
| commit | 39417d93441c5a46896fb765599e25bd1c1aa6db (patch) | |
| tree | c5d3e77b3121addcf4062a78490d503b1aa10d14 /docs/narr/introduction.rst | |
| parent | 9951556030aeed07978472f59b7843273bcb84a8 (diff) | |
| parent | 6a3eed4ddc4178d19c0002ec72b9a1d6494e01ae (diff) | |
| download | pyramid-39417d93441c5a46896fb765599e25bd1c1aa6db.tar.gz pyramid-39417d93441c5a46896fb765599e25bd1c1aa6db.tar.bz2 pyramid-39417d93441c5a46896fb765599e25bd1c1aa6db.zip | |
Merge branch 'master' of github.com:Pylons/pyramid
Diffstat (limited to 'docs/narr/introduction.rst')
| -rw-r--r-- | docs/narr/introduction.rst | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/docs/narr/introduction.rst b/docs/narr/introduction.rst index 032f4be6b..ece720a97 100644 --- a/docs/narr/introduction.rst +++ b/docs/narr/introduction.rst @@ -176,8 +176,14 @@ static file server in production without changing any code. Example: :ref:`static_assets_section`. -Debug Toolbar -~~~~~~~~~~~~~ +Fully Interactive Development +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When developing a Pyramid application, several interactive features are +available. Pyramid can automatically utilize changed templates when rendering +pages and automatically restart the application to incorporate changed python +code. Plain old ``printf()`` calls used for debugging can display to a +console. Pyramid's debug toolbar comes activated when you use a Pyramid scaffold to render a project. This toolbar overlays your application in the browser, and @@ -321,7 +327,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 +345,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: @@ -777,7 +790,7 @@ automate some of the tedium away: for method in ('GET', 'POST', 'HEAD'): view = getattr(module, 'xhr_%s_view' % method, None) if view is not None: - config.add_view(view, route_name='xhr_route', xhr=True, + config.add_view(view, route_name='xhr_route', xhr=True, permission='view', request_method=method) config = Configurator() |
