pyramid
pyramid copied to clipboard
Show how to make a stackable decorators for view callables.
Random: show users how to make a stackable decorators for view callables. For an example, a @login_required decorator (if user is unauthenticated, redirect to login page or raise 401)
I believe this is covered from #627 and http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/views/chaining_decorators.html
Unless we want to show a specific secured login decorator, but in pyramid's case that usually just means setting permission=... instead of using a decorator
Not really what I'd call "covered". I think chrism's original notional was to migrate the cookbook content into the docs proper and expand. A search of the Pyramid docs for "chaining decorators" doesn't produce anything useful at all:
http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/search.html?q=chaining+decorators