Offline is a simple Django app to put a Django Web application under maintenance/offline mode using a simple interface under admin role.
django-offline works with python >= 2.5 and django >= 1.2
Recommended way to install is by using pip as below:
pip install django-offline
Add "offline" to your INSTALLED_APPS setting like this:
- INSTALLED_APPS = (
... 'offline',
)
Add the OfflineMiddleware to MIDDLEWARE_CLASSES list (after SessionMiddleware and AuthenticationMiddleware) in settings.py file of your project:
- MIDDLEWARE_CLASSES = (
... 'offline.middleware.OfflineMiddleware',
)
- Run python manage.py syncdb to create the polls models.
- Visit the admin site to set your Web application to offline mode by setting offline flag (you'll need the Admin app enabled).
- You can customize the message shown on the website.