Rename default error template to error.html, refs #965

This commit is contained in:
Simon Willison 2020-09-14 11:30:31 -07:00
commit 3817152e31
3 changed files with 19 additions and 21 deletions

View file

@ -1124,9 +1124,7 @@ class DatasetteRouter:
info = {}
message = str(exception)
traceback.print_exc()
templates = ["500.html"]
if status != 500:
templates = ["{}.html".format(status)] + templates
templates = ["{}.html".format(status), "error.html"]
info.update(
{
"ok": False,