code: def can_vote_on_poll(self, request):
          
  
          # can't vote if liking is closed
          if self.votes_closed:
              return False, 'closed'
  
          # can't vote if liking is disabled
          if not self.votes_enabled:
              return False, 'disabled'
  
          # anonymous users can't vote if anonymous votes are disabled
          if not request.user.is_authenticated() and not \
                  self.anonymous_votes:
              return False, 'auth_required'
  
          # return false if existing votes are found
          votes = Vote.objects.filter(
              object_id__in=[o.id for o in self.polloption_set.all()],
              token=request.secretballot_token
          )
          if votes.exists():
              return False, 'voted'
          else:
              return True, 'can_vote'
docs: Based on jmbo.models.can_vote.