Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A read only mode tool for your database

Project Description

Django Db Tools is a set of Database tools that are helpful when running applications with Django in production. The primary initial tool allows for flipping a site in and out of a read-only mode.

Currently the following functionality is being worked on:

  • A header displaying the read only mode
  • Ability to render a template explaining posts are not allowed


  1. Add the db_tools directory to your Python path.

  2. Add the following middleware to your project’s file:

        # ...
        # ...


The db tools has two modes which you can control:


This mode ensures all users even if already logged in act as anonymous users on your site. To enable this you need to set the following environment variable:


This mode disallows all POST requests to your site. If your site only allows inserting data as POSTS then this should be sufficient to allow your users to view their data, but also ensure no new data is written. To enable this set the following environment variable:


Release History

This version
History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(3.5 kB) Copy SHA256 Hash SHA256
Source None Mar 4, 2013

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers