Add actionbar for group homepage

This commit is contained in:
cuom1999 2022-11-17 13:10:19 -06:00
parent 36511d1a13
commit 56982806e4
5 changed files with 35 additions and 13 deletions

View file

@ -115,12 +115,9 @@ class PageVoteDetailView(TemplateResponseMixin, SingleObjectMixin, View):
return context
class PageVoteListView(ListView):
pagevote_page = None
def get_context_data(self, **kwargs):
context = super(PageVoteListView, self).get_context_data(**kwargs)
for item in context["object_list"]:
class PageVoteListView:
def add_pagevote_context_data(self, context, obj_list="object_list"):
for item in context[obj_list]:
pagevote, _ = PageVote.objects.get_or_create(
page=self.get_comment_page(item)
)