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:
History
0.2.1 (2017-10-30)
Fixed that the admin would give a 500 when you only set the maintenance_from.
0.2.0 (2017-10-26)
Now the admin exclude will work with i18n urls.
MAINTENANCE_EXCLUDE_ADMIN_URLS is now a setting (default=True)
MAINTENANCE_EXCLUDE_SUPER_USER is now a setting (default=False)
MAINTENANCE_EXCLUDE_STAFF_USER is now a setting (default=False)
0.1.0 (2017-10-26)
First release on PyPI.
Metadata
Release files for django-maintenance-window 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-maintenance-window-0.3.3.tar.gz | 11.4 kB | Without provenance | Details |
Release files / django-maintenance-window-0.3.3.tar.gz
| Download URL | django-maintenance-window-0.3.3.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e40eab6aff711c3abfa73af7ba35df0190110f4ba5a686691fd8f0f6efb950c
|
|
BLAKE2b-256 checksum How to use checksums |
751cd1212a026387bb6bc797d9c9489a7add5d717be921fc485a4cdef59f2c7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
|
Security for django-maintenance-window 0.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.