File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,9 @@ def get_true_argspec(method):
308308 inner_method = cell .cell_contents
309309 if inner_method is method :
310310 continue
311+ if not inspect .isfunction (inner_method ) \
312+ and not inspect .ismethod (inner_method ):
313+ continue
311314 true_argspec = get_true_argspec (inner_method )
312315 if true_argspec :
313316 return true_argspec
Original file line number Diff line number Diff line change @@ -48,8 +48,12 @@ def test_recursive_with_route_with_parameter():
4848
4949
5050def test_params_decorator ():
51- resp = client .get ('/decorated/params_decorator /' )
51+ resp = client .get ('/decorated/params_decorator_method /' )
5252 eq_ (b"Params Decorator" , resp .data )
5353
54+ def test_params_decorator_delete ():
55+ resp = client .delete ('/decorated/1234' )
56+ eq_ (b"Params Decorator Delete 1234" , resp .data )
57+
5458
5559
Original file line number Diff line number Diff line change 11from flask_classy import FlaskView , route
22from functools import wraps
33
4+ VALUE1 = "value1"
5+
6+ def get_value ():
7+ return VALUE1
8+
49class BasicView (FlaskView ):
510
611 def index (self ):
@@ -215,9 +220,14 @@ def post(self):
215220 return "Post"
216221
217222 @params_decorator ("oneval" , "anotherval" )
218- def params_decorator (self ):
223+ def params_decorator_method (self ):
219224 return "Params Decorator"
220225
226+ @params_decorator (get_value (), "value" )
227+ def delete (self , obj_id ):
228+ return "Params Decorator Delete " + obj_id
229+
230+
221231 @more_recursive (None )
222232 def get_some (self ):
223233 return "Get Some"
You can’t perform that action at this time.
0 commit comments