django-db-counter-0.1.0
توضیحات
Obtain continuous count.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | django-db-counter-0.1.0 |
| نام | django-db-counter |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | zencore |
| ایمیل نویسنده | dobetter@zencore.cn |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/django-db-counter/ |
| مجوز | MIT |
# 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.
نیازمندی
| مقدار | نام |
|---|---|
| - | django |
نحوه نصب
نصب پکیج whl django-db-counter-0.1.0:
pip install django-db-counter-0.1.0.whl
نصب پکیج tar.gz django-db-counter-0.1.0:
pip install django-db-counter-0.1.0.tar.gz