Give your site a down page, or redirect to another error page.
Project description
## Django Downtime
Small, simple, app to show a down page while you make upgrades.
Official Docs
Install
Django supports versions 1.4 to 1.8 on Python 2.7 and 3.4.
To install django-downtime:
pip install django-downtime
add to installed apps:
downtime
Add downtime middleware to the top your list of installed middlewares:
'downtime.middleware.DowntimeMiddleware',
Settings
Exempted URLs:
DOWNTIME_EXEMPT_EXACT_URLS = ( '/', # exempts homepage '/other_location/not_down/page', )
Exempted Paths:
DOWNTIME_EXEMPT_PATHS = ( '/admin', '/other_location_not_down', )
Url Redirect
DOWNTIME_URL_REDIRECT = “http://errors.mypage.com”
Templates
If no URL Redirect is specified a lame default template is rendered, this can be overridden by specifying a downtime/downtime.html template.
Management Commands
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-downtime-1.0.4.tar.gz
.
File metadata
- Download URL: django-downtime-1.0.4.tar.gz
- Upload date:
- Size: 194.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33a285927fb2c7ac03304ce0f8757e3e8acb16bdb7edf75f0788cf5322125c5f |
|
MD5 | 7f2771f04c2f6f653729cbdd978f58ad |
|
BLAKE2b-256 | 6bd2ff975f900666e7f668f931903c38caa6f460953c56d438bd86e5e5e65257 |
Provenance
File details
Details for the file django_downtime-1.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: django_downtime-1.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 462a48be35da52765b14d2219065a5ba8400c5ab5b3f833d7a1fa6e289817d56 |
|
MD5 | f6938d92dca6d16dc331c0f04ae3b024 |
|
BLAKE2b-256 | 449a2a51e84bfa2cd0ca8970872564b591f164c75443e50205ad2cc7ab41400f |