handle NotFound
This commit is contained in:
parent
2352412213
commit
deb0b487de
|
@ -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