All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.23.0 - 2026-07-13
- Add
Python 3.14andDjango 6.0support. - Add scheduled maintenance mode support:
set_maintenance_mode(True, start=..., end=...)andmanage.py maintenance_mode on --start ... --end ...(maintenance mode automatically activates/deactivates itself based on the scheduled datetimes). #64- Note for custom state backends consumers:
get_value()now returnsboolordict(scheduled state), and the state file format is extended accordingly (runningmaintenance_mode offrestores the plain bool format).
- Note for custom state backends consumers:
- Add
MAINTENANCE_MODE_LOGOUT_STAFF_USERandMAINTENANCE_MODE_LOGOUT_SUPERUSERsettings to override theMAINTENANCE_MODE_LOGOUT_AUTHENTICATED_USERbehavior for staff users and superusers (ifNone, default, they inherit theMAINTENANCE_MODE_LOGOUT_AUTHENTICATED_USERbehavior). #191 - Allow
MAINTENANCE_MODE_RESPONSE_TYPEto be the path of a function that receives the request and returns the response type ("html"or"json"). #204 - Add
MAINTENANCE_MODE_GET_AUTHENTICATED_USERsetting to support non-session authentication (eg.JWT/ token authentication withdjango-rest-framework). #233 - Improve middleware position docs. #251
0.22.0 - 2025-04-03
- Add
Python 3.13andDjango 5.1/Django 5.2support. - Drop
Python 3.8,Python 3.9andDjango 3.xsupport. - Fix
manage.py maintenance_mode on/offchanges permissions of state file. #172 - Bump requirements and
pre-commithooks.
0.21.1 - 2024-01-24
- Fix
manage.py maintenance_mode on/offchanges permissions of state file. #172 - Bump requirements and
pre-commithooks.
0.21.0 - 2023-12-11
- Add
MAINTENANCE_MODE_LOGOUT_AUTHENTICATED_USERsetting support. #139 - Add
MAINTENANCE_MODE_RESPONSE_TYPE(htmlorjson) setting support. #160 - Renamed
settings.MAINTENANCE_MODE_GET_TEMPLATE_CONTEXTtosettings.MAINTENANCE_MODE_GET_CONTEXT. - Write state file atomically in
maintenance_mode.backends.LocalFileBackend. #162 - Set maintenance mode response
Retry-Afteronly ifMAINTENANCE_MODE_RETRY_AFTERsetting is not0orNone. - Replace
blackandisortwithruff-format. - Bump requirements.
- Bump
pre-commithooks.
0.20.0 - 2023-12-05
- Add
Python 3.12support. - Add
Django 5.0support. - Speed-up test workflow.
- Bump requirements.
- Bump
pre-commithooks.
0.19.0 - 2023-10-03
- Add cache backend (
"maintenance_mode.backends.CacheBackend"). #153 (by @epicserve in #154) - Bump requirements, Github actions and pre-commit hooks.
0.18.0 - 2022-12-12
- Drop
Python < 3.8andDjango < 2.2support. #99 - Add backend for using default static storage (
"maintenance_mode.backends.StaticStorageBackend"). (by @matmair in #97) - Replace
str.formatwithf-strings. - Replace
setup.py testin favor ofruntests.py. - Bump requirements, Github actions and pre-commit hooks.
0.17.1 - 2022-11-22
- Add
Python 3.11support. - Add
Django 4.1support. - Add
pre-commit. - Bump GitHub actions.
- Improve
maintenance_mode.backendsextendibility. - Fix
settings.MAINTENANCE_MODE_STATE_FILE_PATHnot working withpathlib.Pathvalue. #96
0.16.3 - 2022-04-19
- Fixed default storage incompatibility with
s3storage. #85 (thanks to @Natureshadow)
0.16.2 - 2021-12-08
- Added
python 3.10anddjango 4.0compatibility.
0.16.1 - 2021-09-24
- Fixed logging filter condition to disable emailing 503 errors to admins while maintenance mode is enabled. #72
- Added
python 3.9anddjango 3.2totoxandtravis. - Added docstring to
backends, fixed miscellaneous typo. - Removed outdated
CONTEXT_PROCESSORSreference from installation instructions.
0.16.0 - 2021-11-23
- Added
maintenance_mode.backends.DefaultStorageBackend. - Added
maintenance_mode.logging.RequireNotMaintenanceMode503logging filter. #72 - Fixed leading
/insettings.MAINTENANCE_MODE_STATE_FILE_PATH. #76
0.15.1 - 2020-11-21
- Fixed state file content with extra white-space. #71
0.15.0 - 2020-09-03
- Added
maintenance_mode_onandmaintenance_mode_offcontext managers. - Added django 3.1 compatibility.
0.14.0 - 2019-12-03
- Added python 3.8 and django 3.0 compatibility.
0.13.3 - 2019-07-01
- Removed python 3.4 from travis.
0.13.2 - 2019-06-28
- Added django 2.2 compatibility.
0.13.1 - 2019-03-07
- Added
Retry-Afterheader and relative setting.
0.13.0 - 2018-12-21
- Added
MAINTENANCE_MODE_STATUS_CODEsetting.
0.12.0 - 2018-12-03
- Added pluggable backends support.
0.11.0 - 2018-10-08
- Added python 3.7 and django 2.1 support.
- Respect default content type (charset).
- Improved tests coverage.
0.10.0 - 2018-05-31
- Sorted imports alphabetically.
- Added
MAINTENANCE_MODE_IGNORE_ADMIN_SITEsetting. - Added maintenance mode override.
0.9.1 - 2018-05-16
- Fixed #43 - verbose turn on interactive mode. Command now raises
CommandErrorinstead ofIOErrorwhen unable to read/write state file.
0.9.0 - 2018-03-29
- Added
force_maintenance_mode_onandforce_maintenance_mode_offdecorators. - Added
MAINTENANCE_MODE_IGNORE_ANONYMOUS_USERandMAINTENANCE_MODE_IGNORE_AUTHENTICATED_USERsettings.
0.8.0 - 2018-03-19
- Fixed #32 - default state file location.
- Fixed #35 - don't silence errors when the state file can't be created.
- Added Django 1.11 and Django 2.0 compatibility.
0.7.2 - 2018-02-21
- Added verbosity option support to
maintenance_modecommand.
0.7.1 - 2018-02-20
- Allowed regex in
settings.MAINTENANCE_MODE_IGNORE_URLS.
0.7.0 - 2017-12-15
- Added django 2.0 compatibility.
0.6.7 - 2017-12-15
- Resolved import issue for Python3.
- Added Requirements Status badge.
0.6.6 - 2017-10-13
- Integrated
MAINTENANCE_MODEsetting into core.
0.6.5 - 2017-10-02
- Improved pep8 compliance.
- Added code quality badge.
0.6.4 - 2017-08-28
- Fixed #27 - Removed
import_function.
0.6.3 - 2017-04-20
- Fixed #22.
0.6.2 - 2017-04-14
- Added django 1.11 support.
- Added python versions and license badges.
0.6.1 - 2017-03-22
- Added classifiers and license to
setup.py.
0.6.0 - 2017-03-20
- Added
MAINTENANCE_MODE_GET_CLIENT_IP_ADDRESSsetting support. - Renamed
settings.MAINTENANCE_MODE_TEMPLATE_CONTEXTtosettings.MAINTENANCE_MODE_GET_TEMPLATE_CONTEXT. - Renamed
settings.MAINTENANCE_MODE_IGNORE_TESTtosettings.MAINTENANCE_MODE_IGNORE_TESTS. - Added python 3.6 compatibility.
- Added coverage badge.
- Added codecov to tox.
0.5.2 - 2017-03-09
- Added coverage to tox.
- Improved tests coverage to 100%.
- Replaced
printwithCommandErrorin case of command called with invalid arguments.
0.5.1 - 2017-03-02
- Fixed
io.read_filereturn value if file not exists. - Added tox and .travis.
- Moved tests outside app package.
0.5.0 - 2017-02-27
- Added tests.
- Updated middleware and added setting to ignore tests.
- Added django 1.10 commands compatibility.
0.4.6 - 2017-02-13
- Fixed #16 - django 1.10 middleware compliant.
0.4.5 - 2016-11-03
- Fixed #14 - Added the possibility to configure
settings.MAINTENANCE_MODE_STATE_FILE_PATH.
0.4.4 - 2016-10-10
- Fixed #13 - Default context is missing in templates when maintenance mode is on in Django 1.9.
0.4.3 - 2016-10-07
- Fixed #12 - No longer compatible with Django < 1.8 since release 0.3.3.
0.4.2 - 2016-10-03
- Fixed #11 - Added no cache headers to response.
0.4.1 - 2016-09-10
- Added
maintenance_modecontext processor. - Added django 1.10 compatibility.
0.4.0 - 2016-08-30
- Fixed
django.conf.urls.patternswarning.
0.3.5 - 2016-08-24
- Fixed missing import.
0.3.4 - 2016-08-18
- Fixed #5 -
NoReverseMatchexception ifmaintenance_mode.urlswas not added to urlpatterns.
0.3.3 - 2016-08-10
- Added 503 status to response.
0.3.2 - 2016-06-22
- Added capability to pass any context to the template.
- Updated urls for django 1.9 compatibility.
0.3.1 - 2015-09-15
- Fixed
UnboundLocalError. - Added
/maintenance-mode/on/and/maintenance-mode/off/urls support.
0.2.1 - 2015-09-15
- Added error catch if there's no file to check in
get_maintenance_mode. - Changed License to MIT.
0.2.0 - 2015-06-09
- Added
MAINTENANCE_MODE_IGNORE_IP_ADDRESSESsetting support. - Added
MAINTENANCE_MODE_REDIRECT_URLsetting support. - Added
setup.pyandsetup.cfg
0.1.0 - 2015-06-08
- Added sources.