django-readonly /

Filename Size Date modified Message
1.5 KB
18 B
966 B
1.1 KB


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 for that).


  • pip install django-readonly
  • add 'readonly.middleware.ReadOnlyMiddleware', to MIDDLEWARE_CLASSES
  • READ_ONLY = True
  • template: {% if request.read_only %}<p>Website is currently in read-only mode.</p>{% endif %}