Skip to main content

A django model field that generates a random pin of a desired length

Project description

Generates a random pin for your Django model field.

Installation

Install via pip:

$ pip install django-randompinfield

Add to your installed apps:

INSTALLED_APPS = (
    ...
    'randompinfield',
    ...
)

Usage

Import RandomPinField into your models.py.

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.4.2.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