mirror of
https://github.com/kennethreitz/responder.git
synced 2026-06-05 23:00:17 +00:00
Merge pull request #244 from barrust/route-isclass-fix
fix for route.is_class_based
This commit is contained in:
@@ -316,6 +316,8 @@ class API:
|
||||
|
||||
params = route.incoming_matches(req.url.path)
|
||||
|
||||
cont = True
|
||||
|
||||
if route.is_function:
|
||||
try:
|
||||
try:
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
import re
|
||||
import functools
|
||||
import inspect
|
||||
from parse import parse
|
||||
|
||||
|
||||
@@ -59,7 +60,7 @@ class Route:
|
||||
|
||||
@property
|
||||
def is_class_based(self):
|
||||
return hasattr(self.endpoint, "__class__")
|
||||
return inspect.isclass(self.endpoint)
|
||||
|
||||
@property
|
||||
def is_function(self):
|
||||
|
||||
Reference in New Issue
Block a user