Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for 404.html, 500.html templates #965

Closed
simonw opened this issue Sep 14, 2020 · 3 comments
Closed

Documentation for 404.html, 500.html templates #965

simonw opened this issue Sep 14, 2020 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented Sep 14, 2020

This mechanism is not documented:

datasette/datasette/app.py

Lines 1119 to 1129 in 30b98e4

templates = ["500.html"]
if status != 500:
templates = ["{}.html".format(status)] + templates
info.update(
{
"ok": False,
"error": message,
"status": status,
"title": title,
}
)

@simonw simonw added this to the Datasette 0.49 milestone Sep 14, 2020
@simonw
Copy link
Owner Author

simonw commented Sep 14, 2020

Also link to these from the docs added in #964.

@simonw
Copy link
Owner Author

simonw commented Sep 14, 2020

In documenting this I realized that it's confusing that the default 500.html template is often used for non-500 errors (404 for example). I think I'll rename that default template to error.html instead.

@simonw
Copy link
Owner Author

simonw commented Sep 14, 2020

simonw added a commit that referenced this issue Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant