django-paginated-0.1.4
توضیحات
Simple django digg-style pagination.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | django-paginated-0.1.4 |
| نام | django-paginated |
| نسخه کتابخانه | 0.1.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Simas Skrebiškis |
| ایمیل نویسنده | simas.skrebiskis@gmail.com |
| آدرس صفحه اصلی | http://github.com/simas/django-paginated |
| آدرس اینترنتی | https://pypi.org/project/django-paginated/ |
| مجوز | MIT |
django-paginated
================
Installation
------------
```
pip install django-paginated
```
and add `paginated` to project's `INSTALLED_APPS`
Example
-------
To add pagination just change from:
```python
def events(request):
events = Event.objects.all()
context = {
'events': events,
}
return render_to_response(request, 'events.html', context)
```
to
```python
def events(request):
events, pagination = paginated(Event.objects.all(), request)
context = {
'events': events,
'pagination': pagination,
}
return render_to_response(request, 'events.html', context)
```
and in template add line:
```
{{ pagination|safe }}
```
نحوه نصب
نصب پکیج whl django-paginated-0.1.4:
pip install django-paginated-0.1.4.whl
نصب پکیج tar.gz django-paginated-0.1.4:
pip install django-paginated-0.1.4.tar.gz