Fix syntax error in register_routes docs (#1038)

Thanks, @gerrymanoim
This commit is contained in:
gerrymanoim 2020-10-21 18:44:16 -04:00 committed by GitHub
commit 6e26b05799
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -530,7 +530,7 @@ Return a list of ``(regex, view_function)`` pairs, something like this:
@hookimpl
def register_routes():
return [
(r"^/hello-from/(?P<name>.*)$"), hello_from)
(r"^/hello-from/(?P<name>.*)$", hello_from)
]
The view functions can take a number of different optional arguments. The corresponding argument will be passed to your function depending on its named parameters - a form of dependency injection.