summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2013-09-14 02:22:34 -0400
committerChris McDonough <chrism@plope.com>2013-09-14 02:22:34 -0400
commitfaccd80c7251cc6409056edc0552cadbc957145c (patch)
tree554b62dd611a855c48a4c31556367dae68b6bb65
parent1936a3c0ef27c78baebe565706c3f9bcc0defaea (diff)
parent1d04f8f0b483b8d595f5ada24ae5108affe80160 (diff)
downloadpyramid-faccd80c7251cc6409056edc0552cadbc957145c.tar.gz
pyramid-faccd80c7251cc6409056edc0552cadbc957145c.tar.bz2
pyramid-faccd80c7251cc6409056edc0552cadbc957145c.zip
Merge branch 'master' of github.com:Pylons/pyramid
-rw-r--r--HACKING.txt8
-rw-r--r--pyramid/view.py11
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
-
+