Closed franfif closed 3 months ago
Switch back to macros using django-macros package. Still using the Django's Paginator class as previously described.
To use the macros in templates:
{% load macros %} # At the top of the template
{% loadmacros "macros/pagination.html" %}
[...]
{% use_macro render_pagination applications.items %} # When the macro must be used
I corrected the three places where this macros is being used: job_applications.html
, forums/threads.html
and products.html
.
See issue #21
Added pagination template to include on any page requiring pagination. The view should use the Django provided Paginator class and return the current page.
I also replaced the call to paginate macro in forums/threads_html and jobs_applications. Other templates have a pagination bu didn't use the macro.
Next: all pages using pagination should include the template "components/pagination.html" passing the current page from the Django Paginator get_page() method.
For instance, in the Product list view:
and in the product list template: