HACKING.txt | ●●●●● patch | view | raw | blame | history | |
pyramid/view.py | ●●●●● patch | view | raw | blame | history |
HACKING.txt
@@ -21,10 +21,10 @@ (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 pyramid/view.py
@@ -166,6 +166,9 @@ 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 @@ See :ref:`view_defaults` for more information. """ def __call__(self, wrapped): wrapped.__view_defaults__ = self.__dict__.copy() return wrapped @@ -305,7 +308,7 @@ 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 @@ 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 @@ settings['_info'] = info.codeinfo # fbo "action_method" return wrapped