Format and add trans

This commit is contained in:
cuom1999 2022-11-17 16:11:47 -06:00
parent bba7a761ac
commit 2c39774ff7
10 changed files with 294 additions and 205 deletions

View file

@ -41,7 +41,9 @@ def bookmark_page(request, delta):
raise Http404()
if delta == 0:
bookmarklist = MakeBookMark.objects.filter(bookmark=bookmark_page.first(), user=request.profile)
bookmarklist = MakeBookMark.objects.filter(
bookmark=bookmark_page.first(), user=request.profile
)
if not bookmarklist.exists():
newbookmark = MakeBookMark(
bookmark=bookmark_page.first(),
@ -49,7 +51,9 @@ def bookmark_page(request, delta):
)
newbookmark.save()
else:
bookmarklist = MakeBookMark.objects.filter(bookmark=bookmark_page.first(), user=request.profile)
bookmarklist = MakeBookMark.objects.filter(
bookmark=bookmark_page.first(), user=request.profile
)
if bookmarklist.exists():
bookmarklist.delete()
@ -79,4 +83,4 @@ class BookMarkListView(ListView):
page=self.get_comment_page(item)
)
setattr(item, "bookmark", bookmark)
return context
return context