Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

MagicWord provides password-only authentication for protected pages and sites.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 magicword
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.rst
Octocat-spinner-32 setup.py
README.rst

MagicWord

MagicWord provides password-only authentication for protected pages and sites.

Installation

  1. Configure django.contrib.auth according to the documentation.
  2. Add magicword to INSTALLED_APPS in settings.py.
  3. Add magicword.backends.MagicWordBackend to AUTHENTICATION_BACKENDS in settings.py.
  4. Replace the username field in registration/login.html (or a custom login form) with a hidden username field with a value of 'guest'.

Protect a page

Use Django's login_required decorator.

Protect a site

Install the MagicWord middleware:

MIDDLEWARE_CLASSES = (
    ...
    'magicword.middleware.MagicWordMiddleware',
    ...
)
Something went wrong with that request. Please try again.