mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
request.url_vars property, closes #822
This commit is contained in:
parent
db660db463
commit
fac8e93815
5 changed files with 28 additions and 4 deletions
|
|
@ -850,8 +850,8 @@ Return a list of ``(regex, async_view_function)`` pairs, something like this:
|
|||
import html
|
||||
|
||||
|
||||
async def hello_from(scope):
|
||||
name = scope["url_route"]["kwargs"]["name"]
|
||||
async def hello_from(request):
|
||||
name = request.url_vars["name"]
|
||||
return Response.html("Hello from {}".format(
|
||||
html.escape(name)
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue