diff options
| author | Casey Duncan <casey.duncan@gmail.com> | 2010-11-30 19:46:45 -0700 |
|---|---|---|
| committer | Casey Duncan <casey.duncan@gmail.com> | 2010-11-30 19:46:45 -0700 |
| commit | 031d9f20baee7f57534a805809ac6a11319330ce (patch) | |
| tree | 9ab03b9fca24b5542441649eecf287f9e9f48e92 /docs/narr/views.rst | |
| parent | 3f0f1a7c9e0177352023bbe67b1eddf9185d759a (diff) | |
| parent | 5238ae329fb70e5e386db0b127d958c8523d7247 (diff) | |
| download | pyramid-031d9f20baee7f57534a805809ac6a11319330ce.tar.gz pyramid-031d9f20baee7f57534a805809ac6a11319330ce.tar.bz2 pyramid-031d9f20baee7f57534a805809ac6a11319330ce.zip | |
Merge https://github.com/Pylons/pyramid
Diffstat (limited to 'docs/narr/views.rst')
| -rw-r--r-- | docs/narr/views.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/narr/views.rst b/docs/narr/views.rst index ae7e43760..c89d45720 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -475,7 +475,7 @@ You can configure a view to use the JSON renderer by naming ``json`` as the :linenos: config.add_view('myproject.views.hello_world', - name='hello' + name='hello', context='myproject.models.Hello', renderer='json') @@ -1466,6 +1466,7 @@ configuration stanza: .. ignore-next-block .. code-block:: python + :linenos: config.add_view('.views.my_view', name='my_view', request_method='POST', context=MyModel, permission='read') @@ -1495,6 +1496,7 @@ view configuration. To make :app:`Pyramid` process your ``scan`` method of a :class:`pyramid.configuration.Configurator`: .. code-block:: python + :linenos: # config is assumed to be an instance of the # pyramid.configuration.Configurator class |
