Coder Social home page Coder Social logo

kevinglover / django-downtime Goto Github PK

View Code? Open in Web Editor NEW

This project forked from psu-oit/django-downtime

0.0 2.0 0.0 166 KB

Small, simple, app to show a down page or redirect to another site while you make upgrades.

Home Page: http://django-downtime.readthedocs.org

License: Other

Python 97.97% HTML 2.03%

django-downtime's Introduction

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.

django-downtime's People

Contributors

bartoszgrabski avatar dstegelman avatar kevinglover avatar martey avatar philippeowagner avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.