Date formatted object numbering system
Project description
🚀 Simpel Numerators
Simpel 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 simpel-numerators
Usage
from django.db import models
from simpel_numerators.models import NumeratorMixin
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 simpel_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'
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
simpel-numerators-0.1.tar.gz
(7.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simpel-numerators-0.1.tar.gz.
File metadata
- Download URL: simpel-numerators-0.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.27.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2683a7223c1256b63a02bcd3b1150490f364eea4f215cc667ef8c97d79bc1984
|
|
| MD5 |
6337f014ae58cbddbe337cb4404b36b1
|
|
| BLAKE2b-256 |
69dd0beb5567c52a9e6eb6057250eeaf476755f2cae8742c3af1db5ae092a39a
|
File details
Details for the file simpel_numerators-0.1-py3-none-any.whl.
File metadata
- Download URL: simpel_numerators-0.1-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.27.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
518b8ca4d5f9d9a6df25dcca300f6a1e520f4f61fd40966bb2cf34b02a4cf214
|
|
| MD5 |
3443b2e08bd4d45ac642f98c20cdde84
|
|
| BLAKE2b-256 |
02cf8767742a1292db3cf70c15134a122cf195d346173a2aff5f4b31b3a5679d
|