diff --git a/djing/utils/save_from_nodeny.py b/abonapp/templatetags/__init__.py old mode 100755 new mode 100644 similarity index 100% rename from djing/utils/save_from_nodeny.py rename to abonapp/templatetags/__init__.py diff --git a/abonapp/templatetags/dpagination.py b/abonapp/templatetags/dpagination.py new file mode 100644 index 0000000..582009b --- /dev/null +++ b/abonapp/templatetags/dpagination.py @@ -0,0 +1,10 @@ +from django import template + +register = template.Library() + + +@register.simple_tag +def url_page_replace(request, field, value): + dict_ = request.GET.copy() + dict_[field] = value + return dict_.urlencode() diff --git a/templates/toolbar_page.html b/templates/toolbar_page.html index 5d1e9a1..7e98819 100644 --- a/templates/toolbar_page.html +++ b/templates/toolbar_page.html @@ -1,29 +1,24 @@ -{% with request.GET.urlencode|yesno:'&,' as start_divide %} -{% with request.GET.urlencode as url %} -{% if pag.paginator.num_pages > 1 %} -
-
- -
+{% load dpagination %} +
+
+
-{% endif %} -{% endwith %} -{% endwith %} \ No newline at end of file +