pyramid icon indicating copy to clipboard operation
pyramid copied to clipboard

Show how to make a stackable decorators for view callables.

Open ghost opened this issue 13 years ago • 2 comments

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)

ghost avatar Apr 20 '12 20:04 ghost

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

sontek avatar Jan 02 '13 19:01 sontek

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

ghost avatar Jan 02 '13 23:01 ghost