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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47d0491b5a1fd8b2f5629e99a2c665906d175635f6ee779a5c1ff3c3d779c8e7 |
|
MD5 | 0c6e6b07ecc3441b7c11aa4a2e2c91b4 |
|
BLAKE2b-256 | 2163df8676764535791d45007945d7f348f1cd1e4376df74be595120604ba7b1 |