Skip to main content
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 %}

Download files

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

Source Distribution

django-readonly-0.1.2.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file django-readonly-0.1.2.tar.gz.

File metadata

File hashes

Hashes for django-readonly-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d10f469b3ce96249679664c5d593a9f77e749509ff644d31ee93c4ec604cb8b8
MD5 c027518cbe14ee71698f5ebe9cb71667
BLAKE2b-256 6b53c8d32f385b10d7f76e5c6b5000388b4d6ba786e11603909f8eccb54dc128

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 file

0.1.1

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page