Add handler names for websockets for url_for usage (#1880)

This commit is contained in:
Adam Hopkins
2020-06-28 14:45:52 +03:00
committed by GitHub
parent 761eef7d96
commit 938c49b899
6 changed files with 100 additions and 14 deletions

View File

@@ -283,6 +283,13 @@ class Blueprint:
strict_slashes = self.strict_slashes
def decorator(handler):
nonlocal uri
nonlocal host
nonlocal strict_slashes
nonlocal version
nonlocal name
name = f"{self.name}.{name or handler.__name__}"
route = FutureRoute(
handler, uri, [], host, strict_slashes, False, version, name
)