summaryrefslogtreecommitdiff
path: root/docs/narr/views.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/narr/views.rst')
-rw-r--r--docs/narr/views.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/narr/views.rst b/docs/narr/views.rst
index c82dd2cb2..04d90fda8 100644
--- a/docs/narr/views.rst
+++ b/docs/narr/views.rst
@@ -469,7 +469,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')
@@ -1459,6 +1459,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')
@@ -1488,6 +1489,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