Skip to main content

Generate static error pages (502 etc) for when your app is failing

Project description

So... obviously you are a fantastic programmer who never writes a bug and a fantastic systems administrator who never lets your app go down. But what about the rest of us?

Sometimes the upstream app process (e.g. gunicorn) that runs your Django website goes down, and your frontend webserver (e.g. nginx) has to serve a 502 error page to visitors.

This gives you three options:

  • Just use whatever the default error pages are within frontend server. They will be very ugly and embarrassing.

  • Create custom error pages that match your site's styling. Perhaps you deploy them out as static files and point your frontend server at the right location. This starts out great, but as you change your site styling the static error pages will get out of sync. You will create work for yourself to keep them updated.

  • Use this django-downpage project! It provides a downpagegenerate command which can be run just after running collectstatic. It will build static error pages from templates. They will always be up-to-date, but will also be available as static resources even when the app server goes down.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-downpage-1.0.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

django_downpage-1.0.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page