mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fixed test_table_not_exists_json test
This commit is contained in:
parent
647c5ff0f3
commit
d392dc1cfa
1 changed files with 11 additions and 9 deletions
|
|
@ -1016,14 +1016,7 @@ class DatasetteRouter(AsgiRouter):
|
||||||
if status != 500:
|
if status != 500:
|
||||||
templates = ["{}.html".format(status)] + templates
|
templates = ["{}.html".format(status)] + templates
|
||||||
info.update(
|
info.update(
|
||||||
{
|
{"ok": False, "error": message, "status": status, "title": title,}
|
||||||
"ok": False,
|
|
||||||
"error": message,
|
|
||||||
"status": status,
|
|
||||||
"title": title,
|
|
||||||
"base_url": self.ds.config("base_url"),
|
|
||||||
"app_css_hash": self.ds.app_css_hash(),
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
headers = {}
|
headers = {}
|
||||||
if self.ds.cors:
|
if self.ds.cors:
|
||||||
|
|
@ -1033,7 +1026,16 @@ class DatasetteRouter(AsgiRouter):
|
||||||
else:
|
else:
|
||||||
template = self.ds.jinja_env.select_template(templates)
|
template = self.ds.jinja_env.select_template(templates)
|
||||||
await asgi_send_html(
|
await asgi_send_html(
|
||||||
send, await template.render_async(info), status=status, headers=headers
|
send,
|
||||||
|
await template.render_async(
|
||||||
|
dict(
|
||||||
|
info,
|
||||||
|
base_url=self.ds.config("base_url"),
|
||||||
|
app_css_hash=self.ds.app_css_hash(),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
status=status,
|
||||||
|
headers=headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue