Derek Stegelman

Django Downtime

Recently I’ve had a need to display a down page, or simply redirect users to a different site while I did maintenance. I couldn’t quite find what I was looking for so built my own downtime app. While its not perfect it allows me to put up a down page, or just redirect users to another site while I do database maintenance. I’ve published the code on Github and the package is available on PyPi as well.

pip install django-downtime

add to installed apps

downtime

Add downtime middleware to the top your list of installed middlewares

'downtime.middleware.DowntimeMiddleware',

Settings

DOWNTIME_EXEMPT_PATHS = (
    '/admin',
    '/other_location_not_down',
)

DOWNTIME_URL_REDIRECT = "http://errors.mypage.com"

You can check out the rest of the documentation on Github or Read the Docs