Skip to main content

Your project description goes here

Project description

https://badge.fury.io/py/django-maintenance-window.svg https://travis-ci.org/JostCrow/django-maintenance-window.svg?branch=master https://codecov.io/gh/JostCrow/django-maintenance-window/branch/master/graph/badge.svg 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:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-maintenance-window-0.3.0.tar.gz (11.5 kB view details)

Uploaded Source

File details

Details for the file django-maintenance-window-0.3.0.tar.gz.

File metadata

  • Download URL: django-maintenance-window-0.3.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for django-maintenance-window-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8d155fd4a4328c27d2ae996118c4b6b122ed940cb939a0c5633686b65bed598d
MD5 b8a33220d787238acaa7a28c9e1b2576
BLAKE2b-256 f792bb499f33680b415e4bbe8f4f63b6f14e42087b89e96c8dd8c7c47d522bc6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page