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.8 and 1.9 on Python 2 and 3.

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


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.1.1.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

django_downtime-1.1.1-py2.py3-none-any.whl (11.3 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for django-downtime-1.1.1.tar.gz
Algorithm Hash digest
SHA256 d5997c03de505f9cebf23c0c7db10923853ea12ae86028bb636512468733e270
MD5 9f375fbd701c9027d51e6d61949670e4
BLAKE2b-256 c80ea993511b1fe70c6c41a886b16019af40839d2386d31b250ad28e12a505b8

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for django_downtime-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 404c72f22696c27f01d292569efc4313ed3e4e4eec1ea67a5b4bccdd888d8085
MD5 9b2d0a3d390c23ba062055e30217d0a7
BLAKE2b-256 3d502efd14f2584024ac877e4eda9fee8aae66823705faa8ffea030929047dcb

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