diff options
| -rw-r--r-- | HACKING.txt | 8 | ||||
| -rw-r--r-- | pyramid/view.py | 11 |
2 files changed, 11 insertions, 8 deletions
diff --git a/HACKING.txt b/HACKING.txt index 684a42ee6..4ebb59160 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -21,10 +21,10 @@ checkout. (alternately, create a writeable fork on GitHub and check that out). Since pyramid is a framework and not an application, it can be -convenient to work against a sample application, preferably in its -own virtualenv. A quick way to achieve this is to (ab-)use ``tox`` -(http://codespeak.net/~hpk/tox/) with a custom configuration file that's part of -the checkout:: +convenient to work against a sample application, preferably in its own +virtualenv. A quick way to achieve this is to (ab-)use ``tox`` +(http://tox.readthedocs.org/en/latest/) with a custom configuration +file that's part of the checkout:: tox -c hacking-tox.ini diff --git a/pyramid/view.py b/pyramid/view.py index edb4d688c..55ab38871 100644 --- a/pyramid/view.py +++ b/pyramid/view.py @@ -166,6 +166,9 @@ class view_config(object): See :ref:`mapping_views_using_a_decorator_section` for details about using :class:`pyramid.view.view_config`. + ATTENTION: ``view_config`` will work ONLY on module top level members + because of the limitation of ``venusian.Scanner.scan``. + """ venusian = venusian # for testing injection def __init__(self, **settings): @@ -205,7 +208,7 @@ class view_defaults(view_config): See :ref:`view_defaults` for more information. """ - + def __call__(self, wrapped): wrapped.__view_defaults__ = self.__dict__.copy() return wrapped @@ -305,7 +308,7 @@ class notfound_view_config(object): from pyramid.view import notfound_view_config from pyramid.response import Response - + @notfound_view_config() def notfound(request): return Response('Not found, dude!', status='404 Not Found') @@ -368,7 +371,7 @@ class forbidden_view_config(object): from pyramid.view import forbidden_view_config from pyramid.response import Response - + @forbidden_view_config() def forbidden(request): return Response('You are not allowed', status='401 Unauthorized') @@ -404,4 +407,4 @@ class forbidden_view_config(object): settings['_info'] = info.codeinfo # fbo "action_method" return wrapped - + |
