django-maintenance-window¶
Your project description goes here
Documentation¶
The full documentation is at https://django-maintenance-window.readthedocs.io.
Quickstart¶
Install django-maintenance-window:
pip install django-maintenance-window
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'django-solo',
'django_maintenance_window',
...
)
Add django-maintenance-window’s middleware to the middleware:
MIDDLEWARE_CLASSES = [
...
'django_maintenance_window.middleware.MaintenanceModeMiddleware',
...
]
or
MIDDLEWARE = [
...
'django_maintenance_window.middleware.MaintenanceModeMiddleware',
...
]
Settings¶
- MAINTENANCE_TEMPLATE = ‘django_maintenance_window/maintenance.html’
- Overwrite the template that is used for the maintenance template
- MAINTENANCE_DISPLAY_END_DATE = False
- If the end date should be displayed at the bottom of the page.
Running Tests¶
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox