Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

src/q/u/quanda-HEAD/forms.py   quanda(Download)
    def clean(self):
        if not hasattr(self,'edit') and self.author.is_authenticated():
            if Answer.objects.filter(question=self.question, author=self.author):
                raise forms.ValidationError("You've already answered this question.")
        return self.cleaned_data

src/q/u/quanda-HEAD/utils.py   quanda(Download)
                score += QUESTION_VOTED_DOWN
    for answer in Answer.objects.filter(author=profile.user):
        for answer_vote in AnswerVote.objects.filter(answer=answer):
            if answer_vote.score == 1: