handle NotFound
This commit is contained in:
parent
3adb90071b
commit
4942af27dc
|
@ -351,7 +351,10 @@ class Router:
|
|||
:param request: Request object
|
||||
:return: bool
|
||||
"""
|
||||
try:
|
||||
handler = self.get(request)[0]
|
||||
except NotFound:
|
||||
return False
|
||||
if (hasattr(handler, 'view_class') and
|
||||
hasattr(handler.view_class, request.method.lower())):
|
||||
handler = getattr(handler.view_class, request.method.lower())
|
||||
|
|
Loading…
Reference in New Issue
Block a user