Make request available when rendering custom pages, closes #738

This commit is contained in:
Simon Willison 2020-04-26 12:01:46 -07:00
commit 1b7b66c465
2 changed files with 11 additions and 1 deletions

View file

@ -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