Skip to main content

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-randompinfield-0.3.3.tar.gz (1.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page