Metadata-Version: 2.1
Name: django-db-counter
Version: 0.1.0
Summary: Obtain continuous count.
Home-page: UNKNOWN
Author: zencore
Author-email: dobetter@zencore.cn
License: MIT
Keywords: django,django model extensions
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Description-Content-Type: text/markdown
License-File: LICENSE

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


