Changes between Version 1 and Version 2 of Ticket #22406, comment 2
- Timestamp:
- Jun 3, 2016, 5:24:53 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #22406, comment 2
v1 v2 8 8 9 9 - check if the vote of a given type already exists for a given user. This is an unique triple. This step runs: `Vote.filter(booleanfield=request.POST['booleanfield'])` 10 - if yes, delete it11 - else, get the existing vote `vote`, and create orupdate it. This means a form validation: `form = Vote(request.POST, instance=vote)`10 - if the exact same vote exists, delete it 11 - if it exists but with a different value (up or down vote), get the existing vote `vote`, and update it. This means a form validation: `form = Vote(request.POST, instance=vote)` 12 12 13 13 So now, what should my AJAX send?