mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Make request available when rendering custom pages, closes #738
This commit is contained in:
parent
304e7b1d9f
commit
1b7b66c465
2 changed files with 11 additions and 1 deletions
|
|
@ -40,6 +40,7 @@ from .utils import (
|
|||
from .utils.asgi import (
|
||||
AsgiLifespan,
|
||||
NotFound,
|
||||
Request,
|
||||
Response,
|
||||
asgi_static,
|
||||
asgi_send,
|
||||
|
|
@ -785,6 +786,7 @@ class DatasetteRouter(AsgiRouter):
|
|||
"custom_status": custom_status,
|
||||
"custom_redirect": custom_redirect,
|
||||
},
|
||||
request=Request(scope, receive),
|
||||
view_name="page",
|
||||
)
|
||||
# Pull content-type out into separate parameter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue