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

@ -71,6 +71,6 @@ def undobookmark_page(request):
class BookMarkDetailView(TemplateResponseMixin, SingleObjectMixin, View):
def get_context_data(self, **kwargs):
context = super(BookMarkDetailView, self).get_context_data(**kwargs)
queryset = BookMark.objects.get_or_create(page=self.get_comment_page())
context["bookmark"] = queryset[0]
queryset = self.object.bookmark
context["bookmark"] = queryset.first()
return context