Skip to content
Maintenance page
Python HTML Makefile CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
django_maintenance_window
docs
tests
.coveragerc
.deepsource.toml
.editorconfig
.gitignore
.travis.yml
AUTHORS.rst
CONTRIBUTING.rst
HISTORY.rst
LICENSE
MANIFEST.in
Makefile
README.rst
manage.py
requirements.txt
requirements_dev.txt
requirements_test.txt
runtests.py
setup.cfg
setup.py
tox.ini

README.rst

django-maintenance-window

https://travis-ci.org/JostCrow/django-maintenance-window.svg?branch=master Lintly https://bettercodehub.com/edge/badge/JostCrow/django-maintenance-window?branch=master Maintainability

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.
  • MAINTENANCE_EXCLUDE_ADMIN_URLS = True
    This will allow accessing the admin even if maintenance mode is active.
  • MAINTENANCE_EXCLUDE_SUPER_USER = False
    This will allow super users to see the site even if maintenance mode is active.
  • MAINTENANCE_EXCLUDE_STAFF_USER = False
    This will allow staff users to see the site even if maintenance mode is active.

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Credits

Tools used in rendering this package:

You can’t perform that action at this time.