Jul 12, 2012

Basic access authentication implementation. Django 1.4

http://pydanny.com/simple-http-basic-auth-wall.html

# Add to the bottom of your wsgi.py file
# Don't forget to add barrel to your requirements!
from barrel import cooper

REALM = "PRIVATE"
USERS = [('spam', 'eggs')]

application = cooper.basicauth(users=USERS, realm=REALM)(get_wsgi_application())

No comments: