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

Is the NGINX block for 500.html necessary? #161

Open
YPCrumble opened this issue Sep 25, 2020 · 2 comments
Open

Is the NGINX block for 500.html necessary? #161

YPCrumble opened this issue Sep 25, 2020 · 2 comments

Comments

@YPCrumble
Copy link
Collaborator

Currently we include the following block for a few 500-level errors:

    error_page 500 502 504 /500.html;
    location = /500.html {
        root {{ project_path }}/{{ application_name }}/templates/;
    }

However, this seems project-specific. My suggestion is to remove this block and allow users to manage 500-level errors that aren't 503 (Service Unavailable, related to the maintenance page) themselves.

@jcalazan
Copy link
Owner

@YPCrumble It's been a while since I've looked into these but I believe this used to be the standard location to place custom 5xx templates in Django.

I think some projects do use a different structure where the templates folder is inside each app folder so you might be right and it's better to just remove it and let the user customize it. I think Django will simply render the generic 5xx page if there's no template found, so not a big deal to remove it.

@jcalazan
Copy link
Owner

Actually thinking about it again, most new projects probably don't even have a custom 500.html template, so I think removing it is a good call. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants