Skip to main content

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

http://django-downtime.readthedocs.org

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 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 specificing 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”, ususally 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”, ususally called after running a deployment script.

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-downtime-1.0.2.tar.gz (194.0 kB view details)

Uploaded Source

Built Distribution

django_downtime-1.0.2-py2.py3-none-any.whl (10.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-downtime-1.0.2.tar.gz.

File metadata

File hashes

Hashes for django-downtime-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4482aa2f4162e88d2e2a0a43594b94774c27d56e1ca92ce21b463458a01eab2c
MD5 d118e0b8a6e25b1ab31849c8c94f5e1a
BLAKE2b-256 a1e68b7110fd716eb3907781bded9b43c52e4ab4e3507ced26009d8f661004aa

See more details on using hashes here.

Provenance

File details

Details for the file django_downtime-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_downtime-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 02f482adc51ce6e1642b8420f714dd345b050960e4bba652b04146169a4bdee8
MD5 391decc9ae09570cc0f01d9a3e6b9f77
BLAKE2b-256 64484c1ffcc9a6eac628ccf1f1749be24e80b72d5c863ecfa2b38cc40b2561cb

See more details on using hashes here.

Provenance

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