Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pydanny/dj-paginator
Django + Pagination made easy.
https://github.com/pydanny/dj-paginator
Last synced: 3 months ago
JSON representation
Django + Pagination made easy.
- Host: GitHub
- URL: https://github.com/pydanny/dj-paginator
- Owner: pydanny
- License: bsd-3-clause
- Archived: true
- Created: 2015-07-27T03:45:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-07T08:42:39.000Z (almost 8 years ago)
- Last Synced: 2024-05-22T04:20:20.789Z (6 months ago)
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 36
- Watchers: 5
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
- starred-awesome - dj-paginator - Django + Pagination made easy. (Python)
README
=============================
dj-paginator
=============================.. image:: https://badge.fury.io/py/dj-paginator.png
:target: https://badge.fury.io/py/dj-paginator.. image:: https://travis-ci.org/pydanny/dj-paginator.png?branch=master
:target: https://travis-ci.org/pydanny/dj-paginatorA super-simple set of pagination tools for Django 1.8+
Documentation
------------------The full documentation will soon be at https://dj-paginator.readthedocs.io.
Features
--------* Super simple code base.
* Easy to create and switch themes.
* Really good documentation! (coming soon)
* Really good tests! (coming soon)
* Class-Based View mixin so you don't need to load template tags (coming soon)Quickstart
----------Install dj-paginator::
pip install dj-paginator
In your installed apps::
INSTALLED_APPS = [
'paginator'
]In your list view::
class MyListView(ListView):
model = MyModel
paginate_by = 10In your list view template::
{% load paginator_tags %}
{% paginator %}
Done!
Switching to a new theme method 1
---------------------------------::
# Currently defaults to bootstrap.
# I'll add foundation soon.
PAGINATOR_THEME = 'foundation'Switching to a new theme method 2
---------------------------------::
{% load paginator_tags %}
{# Is the default #}
{% bootstrap_paginator %}{# For when I add the foundation theme#}
{% foundation_paginator %}