mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-08-18 18:48:29 +02:00
Forcing POST urls for votes
This commit is contained in:
@@ -61,6 +61,7 @@ def category_iframe(request, slug):
|
||||
|
||||
def vote(request, item, vote):
|
||||
item = get_object_or_404(KBItem, pk=item)
|
||||
if request.method == "POST":
|
||||
if vote == 'up':
|
||||
if not item.voted_by.filter(pk=request.user.pk):
|
||||
item.votes += 1
|
||||
|
Reference in New Issue
Block a user