Give your site a down page, or redirect to another error page.
## Django Downtime
> Looking For Authors! This project is currently looking for a user to take it over. If that sounds like you, send a note to derek at stegelman dot com or open up an issue in this repository.
Small, simple, app to show a down page while you make upgrades.
Django supports versions 1.8, 1.9, 1.10, and 1.11 on Python 2 and 3.
To install django-downtime:
pip install django-downtime
add to installed apps:
Add downtime middleware to the top your list of installed middlewares:
DOWNTIME_EXEMPT_EXACT_URLS = ( '/', # exempts homepage '/other_location/not_down/page', )
DOWNTIME_EXEMPT_PATHS = ( '/admin', '/other_location_not_down', )
DOWNTIME_URL_REDIRECT = “http://errors.mypage.com”
If no URL Redirect is specified a lame default template is rendered, this can be overridden by specifying a downtime/downtime.html template.
There are two managment commands, one to take a project down python manage.py downtime_start and one to set it back up python manage.py downtime_end.
What happens internally when calling python manage.py downtime_start?
This sets a start date time and mark is as enabled. We call this “deployment mode”, usually called before running a deployment script.
What happens internally when calling python manage.py downtime_end?
This sets a end date time to all records that has a start date time and no end date time set and are marked as enabled. We call this “closing deployment mode”, usually called after running a deployment script.
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash||File type||Python version||Upload date|
|django_downtime-1.1.2-py2.py3-none-any.whl (11.4 kB) View hashes||Wheel||2.7|
|django-downtime-1.1.2.tar.gz (12.9 kB) View hashes||Source||None|
Hashes for django_downtime-1.1.2-py2.py3-none-any.whl