def user_can_vote(self, user):
        votes = user.vote_set.order_by('-timestamp')
        if votes.count() > 0:           
            next_date = self.get_next_vote_date(user)
            if dt.today() < next_date and dt.today() < self.end_date:
                return False
        return True
dataset/ETHPy150Open azavea/Open-Data-Catalog/OpenDataCatalog/contest/models.py/Contest.user_can_vote/original