Put your Django website "under construction" with a single setting.
Install the package from pypi.
$ pip install django-underconstruction
Add django_underconstruction
to your INSTALLED_APPS.
# settings.py
INSTALLED_APPS = [
...
'django_underconstruction',
...
]
Add the UnderConstructionMiddleware
middleware class to your MIDDLEWARE.
# settings.py
MIDDLEWARE = [
...
'django_underconstruction.middleware.UnderConstructionMiddleware',
...
]
Once you set settings.UNDER_CONSTRUCTION
to True
the under construction page is shown.
# settings.py
UNDER_CONSTRUCTION = not DEBUG
Option | Description | Default |
---|---|---|
UNDER_CONSTRUCTION |
Whether the site is under construction. | False |
UNDER_CONSTRUCTION_TEMPLATE |
HTML template to show while under construction. | 'django_underconstruction/construction.html' |
Released under the MIT license.