@@ -4,21 +4,23 @@ django-pagination-bootstrap
44
55.. badges-begin
66
7- |Travis | |Python Version | |PyPi | |Black |
7+ |Travis | |Python Version | |PyPi | |Black | | pre-commit |
88
99.. |Travis | image :: https://api.travis-ci.org/staticdev/django-pagination-bootstrap.svg?branch=master
1010 :target: https://travis-ci.org/staticdev/django-pagination-bootstrap
1111
1212.. |Python Version | image :: https://img.shields.io/pypi/pyversions/django-pagination-bootstrap
1313 :target: https://pypi.org/project/django-pagination-bootstrap
1414 :alt: Python Version
15-
1615.. |PyPi | image :: https://badge.fury.io/py/django-pagination-bootstrap.svg
1716 :target: https://badge.fury.io/py/django-pagination-bootstrap
18-
17+ :alt: PyPI
1918.. |Black | image :: https://img.shields.io/badge/code%20style-black-000000.svg
2019 :target: https://github.com/psf/black
2120 :alt: Black
21+ .. |pre-commit | image :: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
22+ :target: https://github.com/pre-commit/pre-commit
23+ :alt: pre-commit
2224
2325Django-pagination-bootstrap is an app to easy add pagination in Django _, using `Bootstrap `_'s layout.
2426
@@ -44,7 +46,7 @@ We need to hook ``django-pagination-bootstrap`` into our project.
4446
4547 INSTALLED_APPS = (
4648 # other apps
47- " django-pagination_bootstrap " ,
49+ " django_pagination_bootstrap " ,
4850 )
4951
5052 2. Install the pagination middleware. Your settings file might look something like:
@@ -56,22 +58,18 @@ We need to hook ``django-pagination-bootstrap`` into our project.
5658 " django_pagination_bootstrap.middleware.PaginationMiddleware" ,
5759 )
5860
59- 3. If it's not already added in your setup, add the request context processor. Note that context processors are set by default implicitly, so to set them explicitly, you need to copy and paste this code into your under the value TEMPLATE_CONTEXT_PROCESSORS.
61+ 3. Guarantee you have `` django.template.context_processors. request`` on settings.py:
6062
6163.. code-block :: python
6264
6365 TEMPLATES = [
6466 {
65- " BACKEND" : " django.template.backends.django.DjangoTemplates" ,
66- " DIRS" : [],
67- " APP_DIRS" : True ,
67+ # ...
6868 " OPTIONS" : {
6969 " context_processors" : [
70- " django.template.context_processors.debug" ,
71- " django.template.context_processors.request" ,
72- " django.contrib.auth.context_processors.auth" ,
73- " django.template.context_processors.i18n" ,
74- " django.template.context_processors.media" ,
70+ # ...
71+ " django.template.context_processors.request"
72+ # ...
7573 ],
7674 },
7775 },
@@ -111,7 +109,7 @@ That's it! You have now paginated object_list and given users of the site a way
111109Side effects
112110============
113111
114- A django-paginator _ instance will be injected in the template context as ``paginator ``. You can access it as usual::
112+ A django-paginator _ instance will be injected in the template context as ``paginator ``. You can access it as usual:
115113
116114.. code-block :: python
117115
0 commit comments