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 }}
```
================
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 }}
```
Metadata
Release files for django-paginated 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-paginated-0.1.4.tar.gz | 3.1 kB | Details |
Release files / django-paginated-0.1.4.tar.gz
| Download URL | django-paginated-0.1.4.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56ea6fc940c37dc47948804e4e5accb0ddc372d8aae00e9439537cf8974cec49
|
|
BLAKE2b-256 checksum How to use checksums |
a3bc905e131b029cdc21451ea5bfdd5537f9aef87b5418e0a47495e105ac222f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |