Method: flask.scaffold.Scaffold._method_route
Calls: 13, Exceptions: 1, Paths: 2Back
Path 1: 12 calls (0.92)
'GET' (8) 'POST' (1) 'PUT' (1) 'DELETE' (1) 'PATCH' (1)
'/' (8) '/login' (1) '/ignored' (1) '/error' (1) '/
{} (12)
Scaffold.route.
1def _method_route(
2 self,
3 method: str,
4 rule: str,
5 options: dict,
6 ) -> t.Callable[[T_route], T_route]:
7 if "methods" in options:
8 raise TypeError("Use the 'route' decorator to use the 'methods' argument.")
9
10 return self.route(rule, methods=[method], **options)
Path 2: 1 calls (0.08)
'GET' (1)
'/' (1)
dict (1)
TypeError (1)
1def _method_route(
2 self,
3 method: str,
4 rule: str,
5 options: dict,
6 ) -> t.Callable[[T_route], T_route]:
7 if "methods" in options:
8 raise TypeError("Use the 'route' decorator to use the 'methods' argument.")
9
10 return self.route(rule, methods=[method], **options)