Ver código fonte

Fix pagination

Colin Powell 3 anos atrás
pai
commit
3cc02f06ac
2 arquivos alterados com 4 adições e 3 exclusões
  1. 3 3
      games/views.py
  2. 1 0
      templates/games/game_detail.html

+ 3 - 3
games/views.py

@@ -18,7 +18,7 @@ class RecentGameList(ListView):
 class LibraryGameList(ListView):
     template_name = "games/game_library_list.html"
     model = Game
-    paginate_by = 100
+    paginate_by = 200
 
     def get_context_data(self, **kwargs):
         game_system_slug = self.request.GET.get("game_system")
@@ -104,7 +104,7 @@ class GenreDetail(DetailView, MultipleObjectMixin):
         return context
 
 
-class PublisherDetail(DetailView):
+class PublisherDetail(DetailView, MultipleObjectMixin):
     model = Publisher
     paginate_by = 20
 
@@ -116,7 +116,7 @@ class PublisherDetail(DetailView):
         return context
 
 
-class DeveloperDetail(DetailView):
+class DeveloperDetail(DetailView, MultipleObjectMixin):
     model = Developer
     paginate_by = 20
 

+ 1 - 0
templates/games/game_detail.html

@@ -1,5 +1,6 @@
 {% extends "base.html" %}
 {% load static %}
+{% block page_title %}{{object.name}} | {{object.game_system}}{% endblock %}
 
 {% block title %}{{object.name}}{% endblock %}