This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Django Simple Auth is a secondary authentication system for protecting any URLs served by your application from public access. It does not replace your authentication system. Rather its purpose is to provide very simple a simple password for non-public information like shared photo galleries.

Installing

First add the application to your Python path. The easiest way is to use pip:

pip install django-simple-auth

Configuring

Make sure you have django.contrib.auth installed, and add the simple_auth application to your INSTALLED_APPS list:

INSTALLED_APPS = [
    ...
    'django.contrib.auth',
    'simple_auth',
]

Next add simple_auth.urls to your project URLs.:

...
url(r'^protect/', include('simple_auth.urls')),

If you want to enable default rule-based limits on your site, install the SimpleAuthMiddleware:

MIDDLEWARE_CLASSES = [
    ...
    'simple_auth.SimpleAuthMiddleware',
]

By default this will require a password for all URLs except for URLs prefaced with /admin/. These URLs can be overridden using protect and ignore settings.:

SIMPLE_AUTH_IGNORE = [
    r'^admin/,
    r'^$',
]

SIMPLE_AUTH_PROTECT = [
    r'^forums/'
    r^blog/',
    r^secret_page.html$',
]

If a URL is listed in both the ignore and protect lists the default will be to protect the URL and simple_auth will emit a warning.

Usage overview

There are two ways to protect pages and assets: view decorators and middleware.

These methods will always allow authenticated users to access the URL.

Middleware

To enable the middleware install the middleware class as described in the installation section.

Individual views

Note: not implemented yet.

For function views:

from simple_auth import simple_auth_required

@simple_auth_required
def myview(request):
    ...

For class-based views:

from simple_auth import SimpleAuthMixin

class MyView(SimpleAuthMixin, DetailView):
    ...
Release History

Release History

0.1.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_simple_auth-0.1.5-py2.py3-none-any.whl (8.4 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Jan 7, 2016
django-simple-auth-0.1.5.tar.gz (5.3 kB) Copy SHA256 Checksum SHA256 Source Jan 7, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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