diff options
| author | Chris McDonough <chrism@plope.com> | 2012-02-29 08:59:48 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-02-29 08:59:48 -0500 |
| commit | 25d7c28c6830d7f55b206b0467cd987e77f07515 (patch) | |
| tree | 255ff6be6ddac237282c14e9a011cb3321b470ab /docs/narr | |
| parent | 050feaac192383c457f4d27591c1a26b55988fca (diff) | |
| download | pyramid-25d7c28c6830d7f55b206b0467cd987e77f07515.tar.gz pyramid-25d7c28c6830d7f55b206b0467cd987e77f07515.tar.bz2 pyramid-25d7c28c6830d7f55b206b0467cd987e77f07515.zip | |
fix decorators
Diffstat (limited to 'docs/narr')
| -rw-r--r-- | docs/narr/hooks.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index c44323201..f1a122c6c 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -42,7 +42,7 @@ and a :term:`scan`, you can replace the Not Found view by using the from pyramid.view import notfound_view_config - notfound_view_config() + @notfound_view_config() def notfound(request): return Response('Not Found, dude', status='404 Not Found') @@ -64,11 +64,11 @@ views can carry predicates limiting their applicability. For example: from pyramid.view import notfound_view_config - notfound_view_config(request_method='GET') + @notfound_view_config(request_method='GET') def notfound_get(request): return Response('Not Found during GET, dude', status='404 Not Found') - notfound_view_config(request_method='POST') + @notfound_view_config(request_method='POST') def notfound_post(request): return Response('Not Found during POST, dude', status='404 Not Found') |
