Skip to main content

Django Numerators

Django Numerators track autonumber style inner_id for model record This repository contains a Numerator model utils to create nice formatted Inner ID.

Installation

$ pip install django-numerators

or

$ pip install git+https://github.com/sasriawesome/django_numerators.git#egg=django-numerators

Usage

from django.db import models
from django_numerators.models import NumeratorMixin, NumeratorReset

class Product(NumeratorMixin):
    doc_prefix = 'PD'
    name = models.CharField(max_length=100)

Usage with Polymorphic

install django-polymorphic

$ pip install django-polymorphic

Using Parent Model doc_prefix

from django.db import models
from polymorphic.models import PolymorphicModel
from django_numerators.models import NumeratorMixin, NumeratorReset

class Product(NumeratorMixin):
    doc_prefix = 'PD'
    parent_prefix = True
    parent_model = 'Parent2'
    name = models.CharField(max_length=100)

class Inventory(Product):
    pass

class Asset(Product)
    pass

Using Child Model doc prefix

class Product(NumeratorMixin):
    name = models.CharField(max_length=100)

class Inventory(Product):
    doc_prefix = 'INV'

class Asset(Product)
    doc_prefix = 'AST'

Metadata

Release files for django-numerators 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-numerators 0.0.2
File Size Uploaded Provenance Actions
django-numerators-0.0.2.tar.gz 6.9 kB Without provenance Details for django-numerators-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-numerators 0.0.2
File Interpreter ABI Platform Actions
django_numerators-0.0.2-py3-none-any.whl Python 3 none any Details for django_numerators-0.0.2-py3-none-any.whl

Total release size: 14.9 kB

Release files / django-numerators-0.0.2.tar.gz

Download URL django-numerators-0.0.2.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a96bb2a00aa0c684aa051c4edc1bdc440947ab5cdc22884af3c962a3444c522b
BLAKE2b-256 checksum
How to use checksums
84d558904825413a357daaf66bcf26dec0a24e277a0957d7cce1a927c6836a91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4

Release files / django_numerators-0.0.2-py3-none-any.whl

Download URL django_numerators-0.0.2-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ebd178c45fdd964277f956fe87d2aaa3866c87ca3dc37f82d51bf15e91516a3e
BLAKE2b-256 checksum
How to use checksums
a507418c27e85d3b75e76311fd463d2d8bbf2908a5b5bdab885853e1e6ad2d34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4

Security for django-numerators 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page