Giter VIP home page Giter VIP logo

outage's Introduction

Outage: A Django App To Shut Down Your Django App

This is a simple app that can be used to bring down a PyPE django project by simply adding an entry to an oracle table.

Usage

To include this app in your PyPE project, simply pull it into your project via svn:externals.

path: extra/outage

URL: https://github.com/UT-Austin-FIS/outage/tags/1.2/outage

Setup

  1. Add "outage" to your INSTALLED_APPS setting like this::
      INSTALLED_APPS = (
          ...
          'outage',
      )
  1. Add the outage middleware to your MIDDLEWARE_CLASSES setting like this::
      MIDDLEWARE_CLASSES= (
          ...
          'outage.middleware.OutageMiddleware',
      )
  1. Add an OUTAGE_CONTEXT object to your settings.py. This should be a class that carries the core of your page context logic. If not supplied, the UTDirectContext will be used, but you will need to supply the api key in your settings (eg: API_KEY = 'your_api_key')::
   OUTAGE_CONTEXT = 'path.to.your.desired.context.object'
  1. Add an OUTAGE_DEFAULT_REDIRECT to your settings.py. This should be the name url pattern, and will be used to redirect any users attempting to access the outage urls directly, when there is no outage occuring.::
   OUTAGE_DEFAULT_REDIRECT = 'url_name' # e.g.: 'home'
  1. Include the outage URLconf in your project urls.py like this::
    url(r'^apps/services/requests/', include(outage.urls)),
  1. Run python manage.py syncdb to create the outage models.

NOTE: Since this app creates a new table, if your database design involves multiple users, you will need to go through the same process that you typically use to migrate a table and grant privileges.

outage's People

Contributors

jtgraves avatar

Watchers

 avatar James Cloos 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.