From: Mike TUMS Date: Mon, 7 Apr 2014 08:35:33 +0000 (+0400) Subject: Implements zyga/django-pagination#22 X-Git-Tag: release-2.1~4^2~2 X-Git-Url: https://git.mdrn.pl/django-pagination.git/commitdiff_plain/4b2ba62948c5104fc3cae8d24face3c4bf7378df?ds=sidebyside;hp=--cc Implements zyga/django-pagination#22 --- 4b2ba62948c5104fc3cae8d24face3c4bf7378df diff --git a/doc/usage.rst b/doc/usage.rst index a57cf46..199e6a3 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -168,3 +168,7 @@ behavior of the pagination tags. Here's an overview: ``PAGINATION_DISPLAY_DISABLED_NEXT_LINK`` If set to ``False``, the next page link will not be displayed if there's no next page. Defaults to False. + +``PAGINATION_DISABLE_LINK_FOR_FIRST_PAGE`` + if set to ``False``, the first page will have ``?page=1`` link suffix in pagination displayed, otherwise is omitted. + Defaults to True. diff --git a/linaro_django_pagination/settings.py b/linaro_django_pagination/settings.py index ff74fd3..24a04e0 100644 --- a/linaro_django_pagination/settings.py +++ b/linaro_django_pagination/settings.py @@ -52,3 +52,5 @@ DISPLAY_DISABLED_PREVIOUS_LINK = getattr( settings, 'PAGINATION_DISPLAY_DISABLED_PREVIOUS_LINK', False) DISPLAY_DISABLED_NEXT_LINK = getattr( settings, 'PAGINATION_DISPLAY_DISABLED_NEXT_LINK', False) +DISABLE_LINK_FOR_FIRST_PAGE = getattr( + settings, 'PAGINATION_DISABLE_LINK_FOR_FIRST_PAGE', True) diff --git a/linaro_django_pagination/templates/pagination/pagination.html b/linaro_django_pagination/templates/pagination/pagination.html index 1bd9ab5..5d926a3 100644 --- a/linaro_django_pagination/templates/pagination/pagination.html +++ b/linaro_django_pagination/templates/pagination/pagination.html @@ -3,7 +3,11 @@