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!

Decorator to provide Basic Authentication for Django Views

Project Description


This is a decorator for a django view that will request Basic Authentication. This is a copy of


There are serveral reasons for this Package:

  • I wanted Basic Authentication for just a couple of views. So the RemoteUserAuthBackend was no option. Also I did not want to configure the webserver to do Basic Authentication.
  • As you can read in the comments of there are some bugs in it - so I wanted to have them fixed - but also documented that they were fixed and in the end provide a fixed version of it
  • Also I just want to install it via pip

How to use


Add this to your apache config to tell apache to pass the Authorication Headers to your application:

WSGIPassAuthorization On
Release History

Release History

This version
History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-basic-authentication-decorator-0.9.tar.gz (2.6 kB) Copy SHA256 Checksum SHA256 Source Apr 20, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting