From: Zygmunt Krynicki Date: Tue, 14 Jun 2011 10:51:49 +0000 (+0200) Subject: Use custom template the example app X-Git-Tag: release-2.0~5 X-Git-Url: https://git.mdrn.pl/django-pagination.git/commitdiff_plain/6709fa28cae82cc063c2c472101e4e66acbb7c89?ds=inline Use custom template the example app --- diff --git a/linaro_django_pagination/test_project/example/templates/example/two_lists.html b/linaro_django_pagination/test_project/example/templates/example/two_lists.html index 8f16789..6dde4c9 100644 --- a/linaro_django_pagination/test_project/example/templates/example/two_lists.html +++ b/linaro_django_pagination/test_project/example/templates/example/two_lists.html @@ -8,14 +8,14 @@

First list has {{ first_item_list|length }} items.

{% autopaginate first_item_list 5 %} {% for item in first_item_list %} -

Item {{item}}

+

{{item}}

{% endfor %} -{% paginate %} +{% paginate using2 "pagination/custom_pagination.html" %}

Second list has {{ second_item_list|length}} items.

{% autopaginate second_item_list 5 %} {% paginate %} {% for item in second_item_list %} -

Item {{item}}

+

{{item}}

{% endfor %} {% endblock %} diff --git a/linaro_django_pagination/test_project/example/templates/pagination/custom_pagination.html b/linaro_django_pagination/test_project/example/templates/pagination/custom_pagination.html new file mode 100644 index 0000000..49320b9 --- /dev/null +++ b/linaro_django_pagination/test_project/example/templates/pagination/custom_pagination.html @@ -0,0 +1,7 @@ +{% extends "pagination/pagination.html" %} + + +{% block previouslink %} +

This part is custom

+ {{ block.super }} +{% endblock previouslink %}