Obtain continuous count.
Project description
django-db-counter
Obtain continuous count.
Install
pip install django-db-counter
Use a shared table to count
from django_db_counter.models import DjangoDBCounter
some_id = DjangoDBCounter.get_next("some_keyword")
Use a dedicated table to count
app/models.py
from django_db_counter.models import DjangoDBCounterBase
class MyCounter(DjangoDBCounterBase):
default_key = "my_counter_keyword" # default to "default"
app/views.py
from app.models import MyCounter
some_id = MyCounter.get_next()
Releases
v0.1.0
- First release.
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
Built Distribution
Close
Hashes for django_db_counter-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c1dd8437e619800299223e67a661dfcec9f5ffba4f6675dc4279b206aefb3ef |
|
MD5 | cf8d15a65c2b923268c4e29ecea69e69 |
|
BLAKE2b-256 | 50f58b1a2d52bf4d9e5c0b622dc700b4e1edcdf80def58a0a57240c75bb33078 |