Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Put your website into read-only mode for maintanance.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
readonly
LICENSE
MANIFEST.in
README.rst
setup.py

README.rst

Django-Readonly

Latest PyPI version Number of PyPI downloads

Put your website into read-only mode for maintanance. It blocks any POST requests and signs users out. It doesn't lock any database transactions (check out https://github.com/streeter/django-db-readonly for that).

Usage

  • pip install django-readonly
  • settings.py: add 'readonly.middleware.ReadOnlyMiddleware', to MIDDLEWARE_CLASSES
  • settings.py: READ_ONLY = True
  • template: {% if request.read_only %}<p>Website is currently in read-only mode.</p>{% endif %}
Something went wrong with that request. Please try again.