A simple django app that provides site-wide easy password authentication for 1 user
Project description
django-pin-passcode [![Circle CI](https://circleci.com/gh/ckcollab/django-pin-passcode.svg?style=svg)](https://circleci.com/gh/ckcollab/django-pin-passcode)
===================
<p align="center"><img src="https://github.com/ckcollab/django-pin-passcode/raw/master/docs/screenshot.png" alt="Django Pin Passcode Example"></p>
This is a simple app that adds a site wide pin-passcode for quick authentication. I wrote this originally for my personal
motivation tracker [chin up](https://github.com/ckcollab/chin-up) so I could quickly login from my phone.
You enter a PIN passcode (using 0-9 and #) until the correct pin is entered, then:
* If `PIN_PASSCODE_USERNAME` is set, you will be logged in as this user
* Otherwise, a session variable will be set and you will be able to browse the site
Installation
============
```bash
pip install django-pin-passcode
```
```python
# settings.py
INSTALLED_APPS += (
'pin_passcode',
)
...
MIDDLEWARE_CLASSES += (
'pin_passcode.middleware.PinPasscodeMiddleware',
)
...
# user to sign in as, leave blank to use a session variable instead
#PIN_PASSCODE_USERNAME = 'eric' # uncomment this to login as "eric" after valid pin code is entered
PIN_PASSCODE_PIN = 1234 # the passcode required to login as the above user, using 0-9 and '#'
```
```python
# urls.py
urlpatterns = patterns(
...
url(r'^', include('pin_passcode.urls')),
...
)
```
Testing
=======
`pip install -r requirements.txt`
`py.test`
===================
<p align="center"><img src="https://github.com/ckcollab/django-pin-passcode/raw/master/docs/screenshot.png" alt="Django Pin Passcode Example"></p>
This is a simple app that adds a site wide pin-passcode for quick authentication. I wrote this originally for my personal
motivation tracker [chin up](https://github.com/ckcollab/chin-up) so I could quickly login from my phone.
You enter a PIN passcode (using 0-9 and #) until the correct pin is entered, then:
* If `PIN_PASSCODE_USERNAME` is set, you will be logged in as this user
* Otherwise, a session variable will be set and you will be able to browse the site
Installation
============
```bash
pip install django-pin-passcode
```
```python
# settings.py
INSTALLED_APPS += (
'pin_passcode',
)
...
MIDDLEWARE_CLASSES += (
'pin_passcode.middleware.PinPasscodeMiddleware',
)
...
# user to sign in as, leave blank to use a session variable instead
#PIN_PASSCODE_USERNAME = 'eric' # uncomment this to login as "eric" after valid pin code is entered
PIN_PASSCODE_PIN = 1234 # the passcode required to login as the above user, using 0-9 and '#'
```
```python
# urls.py
urlpatterns = patterns(
...
url(r'^', include('pin_passcode.urls')),
...
)
```
Testing
=======
`pip install -r requirements.txt`
`py.test`
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-pin-passcode-0.1.5.tar.gz
(56.6 kB
view details)
File details
Details for the file django-pin-passcode-0.1.5.tar.gz
.
File metadata
- Download URL: django-pin-passcode-0.1.5.tar.gz
- Upload date:
- Size: 56.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 187bc8ec20023b90b92a8e350e2b4d902ff31ce38a49198d699fad5314f109f8 |
|
MD5 | bca8eceb7ae14d76b21906bef869f99b |
|
BLAKE2b-256 | 8b5569ec05f4f06ae4e7424ba024277879bcec1d7d4036aca174e7bf31a7273c |