parameters: (self, request, election, **kwargs)
return_statement: return self.create_response(request, dict(status="success"))
docstring: Starts an election
docstring_summary: Starts an election
docstring_tokens: Starts an election
function: def start_action(self, request, election, **kwargs):
          '''
          Starts an election
          '''
  
          tkwargs=dict(
              election_id=election.id,
              is_secure=request.is_secure(),
              site_id=Site.objects.get_current().id,
              remote_addr=request.META.get('REMOTE_ADDR'),
              user_id=request.user.id
          )
  
          election.last_modified_at_date = timezone.now()
          election.voting_starts_at_date = election.last_modified_at_date
          if not election.frozen_at_date:
              election.frozen_at_date = election.last_modified_at_date
          election.save()
          transaction.commit()
  
          start_election.apply_async(kwargs=tkwargs, task_id=election.task_id(start_election))
          return self.create_response(request, dict(status="success"))
function_tokens: def start_action ( self , request , election , * * kwargs ) : tkwargs = dict ( election_id = election . id , is_secure = request . is_secure ( ) , site_id = Site . objects . get_current ( ) . id , remote_addr = request . META . get ( 'REMOTE_ADDR' ) , user_id = request . user . id ) election . last_modified_at_date = timezone . now ( ) election . voting_starts_at_date = election . last_modified_at_date if not election . frozen_at_date : election . frozen_at_date = election . last_modified_at_date election . save ( ) transaction . commit ( ) start_election . apply_async ( kwargs = tkwargs , task_id = election . task_id ( start_election ) ) return self . create_response ( request , dict ( status = "success" ) )