widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #13411
[Merge] lp:~widelands-dev/widelands-website/bug-1770881_fix_pagination_model_names into lp:widelands-website
kaputtnik has proposed merging lp:~widelands-dev/widelands-website/bug-1770881_fix_pagination_model_names into lp:widelands-website.
Commit message:
Fix pagination model names
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1770881 in Widelands Website: "Pagination shows wrong model name"
https://bugs.launchpad.net/widelands-website/+bug/1770881
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/bug-1770881_fix_pagination_model_names/+merge/345465
Fix pagination model names, bug 1770881
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/bug-1770881_fix_pagination_model_names into lp:widelands-website.
=== modified file 'mainpage/templatetags/wl_extras.py'
--- mainpage/templatetags/wl_extras.py 2018-04-18 12:04:12 +0000
+++ mainpage/templatetags/wl_extras.py 2018-05-12 19:03:12 +0000
@@ -41,5 +41,5 @@
@register.filter
def get_model_name(object):
"""Returns the name of an objects model."""
-
+ print("franku object: ", object)
return object.__class__.__name__
=== modified file 'templates/pagination/pagination_mod.html'
--- templates/pagination/pagination_mod.html 2018-02-11 14:48:26 +0000
+++ templates/pagination/pagination_mod.html 2018-05-12 19:03:12 +0000
@@ -13,7 +13,7 @@
<strong>{{ page_obj.start_index }}</strong> —
<strong>{{ page_obj.end_index }}</strong> {% trans "of" %}
<strong>{{ paginator.count }}</strong>
- {{ object_list.0 | get_model_name }}{{ paginator.count|pluralize }}</span>
+ {{ paginator.object_list.0 | get_model_name }}{{ paginator.count|pluralize }}</span>
{% if page_obj.has_previous %}
{% if disable_link_for_first_page and page_obj.previous_page_number == 1 %}
<a href="{{ request.path }}
Follow ups