APIClone is, in theory, very much DDOS-able so here's a brick wall... that Scratch-WWW can't collaborate with :/
Find a file
2026-01-04 11:01:35 -05:00
password_required Middleware support 2026-01-04 11:01:35 -05:00
.gitignore Initial gitignore. 2010-06-02 21:31:58 +02:00
LICENSE A few details. 2010-06-02 00:22:22 +02:00
README.mkd Middleware support 2026-01-04 11:01:35 -05:00

Django Password Required

A reusable Django app for requiring a password to access some pages on a site, without requiring users to register an account.

This is a very simple method of authentication, and is intended to provide a low barrier of entry to a site that is not completely public.

Use cases could be previews of sites that users are not supposed to log in to, Stack Overflow-style beta tests, etc.

Using the @password_required decorator, you can password-protect individual views.

This module is based on simple session variables, and thus interoperable with django.contrib.auth, allowing you to optionally bypass password protection for all authenticated users, or only for certain groups.

Usage

Set PASSWORD_REQUIRED_PASSWORD to the preferred password in APIClone's local settings file.

PASSWORD_REQUIRED_PASSWORD = 'mysecretpassword'

Requirements

Probably Django ~3.0 and higher, though APIClone only works with ~4.2+

License

This app is BSD-licensed, just like Django.