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:
.. code:: bash
$ pip install django-randompinfield
Add to your installed apps:
.. code:: python
INSTALLED_APPS = (
...
'randompinfield',
...
)
Usage
----------
Import ``RandomPinField`` into your ``models.py``.
.. code:: 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:
.. code:: bash
$ pip install django-randompinfield
Add to your installed apps:
.. code:: python
INSTALLED_APPS = (
...
'randompinfield',
...
)
Usage
----------
Import ``RandomPinField`` into your ``models.py``.
.. code:: 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.3.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a614cae6974a90dc9ba3961fc15924f0cac59ac46f936b408080d6a6e964c64 |
|
MD5 | 3df4ab09c8ee89a4d0bfe7ba9ca28f99 |
|
BLAKE2b-256 | 43048eb75ad0fd01b1538cdb7b98a5c6907979b476525f968854e999d8d7c05d |