A django model field that generates a random pin of a desired length
Project description
# django-randompinfield
Generates a random pin for your Django model field.
## Installation
Install via pip:
``` bash
pip install django-randompinfield
```
Add to your installed apps:
``` python
INSTALLED_APPS = (
...
'randompinfield',
...
)
```
## Usage
Import ```RandomPinField``` into your ```models.py```.
``` python
from django.db import models
from randompinfield import RandomPinField
class MyModel(models.Model):
slug = RandomPinField(length=3)
```
The ```length``` is an optional argument.
Generates a random pin for your Django model field.
## Installation
Install via pip:
``` bash
pip install django-randompinfield
```
Add to your installed apps:
``` python
INSTALLED_APPS = (
...
'randompinfield',
...
)
```
## Usage
Import ```RandomPinField``` into your ```models.py```.
``` python
from django.db import models
from randompinfield import RandomPinField
class MyModel(models.Model):
slug = RandomPinField(length=3)
```
The ```length``` is an optional argument.
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
Close
Hashes for django-randompinfield-0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ee57dedbee2f65c5cab654a04d1e387d3c7081a721f4126ea1e17f733fe2753 |
|
MD5 | 7a75900a10c7b7914365617cce98d384 |
|
BLAKE2b-256 | 8a0196fc272cb7d77a375da4c531869f65aca0e21ff36a89244daa4a2ac8b776 |