mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Support non-async view functions, closes #867
This commit is contained in:
parent
1bb33dab49
commit
4b142862f2
4 changed files with 33 additions and 10 deletions
|
|
@ -187,12 +187,16 @@ def register_routes():
|
|||
await datasette.render_template("csrftoken_form.html", request=request)
|
||||
)
|
||||
|
||||
def not_async():
|
||||
return Response.html("This was not async")
|
||||
|
||||
return [
|
||||
(r"/one/$", one),
|
||||
(r"/two/(?P<name>.*)$", two),
|
||||
(r"/three/$", three),
|
||||
(r"/post/$", post),
|
||||
(r"/csrftoken-form/$", csrftoken_form),
|
||||
(r"/not-async/$", not_async),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue