From 779a9b5af8cc035d4e9091938f15e408a12338d7 Mon Sep 17 00:00:00 2001 From: Underground Theater Date: Mon, 27 Oct 2014 17:22:56 -0400 Subject: [PATCH] allow for kwargs to be passed to decorator Assumes loop element is a tuple of the decorator and the dict() of kwargs, but will fall-over to a plain old decorator. --- flask_classy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_classy.py b/flask_classy.py index e0c5ccd..65775fa 100644 --- a/flask_classy.py +++ b/flask_classy.py @@ -176,7 +176,7 @@ def make_proxy_method(cls, name): if cls.decorators: for decorator in cls.decorators: - view = decorator(view) + view = decorator[0](view, **decorator[1]) or decorator(view) @functools.wraps(view) def proxy(**forgettable_view_args):