This application will detect an Oracle database outage, and will handle it gracefully by rendering a default error page.
To include this app in your PyPE project, simply pull it into your project via
svn:externals
.
path: extra/db_outage
URL: https://github.com/UT-Austin-FIS/db_outage/tags/v1.1.1/db_outage
-
Add "
db_outage
" to yourINSTALLED_APPS
setting like this:INSTALLED_APPS = ( # ... 'db_outage', # ... )
-
Add the
db_outage
middleware to yourMIDDLEWARE_CLASSES
in settings. It needs to be near the top, if not the very top of your middleware stack:MIDDLEWARE_CLASSES = ( 'db_outage.middleware.DBOutageMiddleware', # ... )
-
Add
DB_OUTAGE_CONTEXT
to yoursettings
. This should be a path to a class that carries the core of your page context logic. It will likely be subclass of the DjangoRequestContext
object. IMPORTANT: The context object you supply MUST NOT require oracle database access.DB_OUTAGE_CONTEXT = 'path.to.your.desired.ContextObject'
-
Add
DB_OUTAGE_MESSAGE
to your settings. This is a custom message that will be displayed when a database outage occurs:DB_OUTAGE_MESSAGE = ( 'The <your application name> system is currently unavailable. ' 'We are working to restore service.' )
- v1.1.2 (2018/02/20)
- Adding support for Django 1.11
- v1.1.1 (2015/02/05)
- Adding version info
- v1.1 (2015/01/22)
- Adding support for Django 1.7
- v1.0 (2014/05/29)
- initial release with support for at least:
- Python 2.6 - 2.7
- Django 1.4
- initial release with support for at least: