Migrate pagevote and bookmark to use content_type

This commit is contained in:
cuom1999 2023-08-03 16:04:39 +07:00
parent 64495be799
commit 36e27321f7
19 changed files with 285 additions and 87 deletions

View file

@ -101,6 +101,6 @@ class PageVoteDetailView(TemplateResponseMixin, SingleObjectMixin, View):
def get_context_data(self, **kwargs):
context = super(PageVoteDetailView, self).get_context_data(**kwargs)
queryset = PageVote.objects.get_or_create(page=self.get_comment_page())
context["pagevote"] = queryset[0]
queryset = self.object.pagevote
context["pagevote"] = queryset.first()
return context