Changes between Initial Version and Version 1 of Ticket #22406, comment 2


Ignore:
Timestamp:
Jun 3, 2016, 5:22:54 PM (8 years ago)
Author:
Ciro Santilli 六四事件 法轮功 包卓轩

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22406, comment 2

    initial v1  
    77Now the view works as follows:
    88
    9 - check if the vote of a given type already exists for a given user. This is an unique triple: `Vote.filter(booleanfield=request.POST['booleanfield'])`
     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'])`
    1010- if yes, delete it
    1111- else, get the existing vote `vote`, and create or update it. This means a form validation: `form = Vote(request.POST, instance=vote)`
Back to Top