Commit 5df206e6 authored by luxcem's avatar luxcem

updates votes view

parent f2c81e44
......@@ -2,6 +2,8 @@
.DS_Store
._*
.#*
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
......
......@@ -27,12 +27,12 @@ class UDList(ListView):
context = super().get_context_data(**kwargs)
context["und_votes"] = {
"upvoted": queryset.filter(
und_votes__user=self.request.user,
und_votes__username=self.request.user.username,
und_votes__content_type=content_type,
und_votes__score=1
).values_list("id", flat=True),
"downvoted": queryset.filter(
und_votes__user=self.request.user,
und_votes__username=self.request.user.username,
und_votes__content_type=content_type,
und_votes__score=-1
).values_list("id", flat=True)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment