예제 #1
0
 def clean_signature(self):
     signature = self.cleaned_data['signature']
     if is_spam(self.request, signature):
         raise forms.ValidationError(
             "Your signature was considered spam, please edit and resubmit. If it keeps "
             "failing please contact the admins.")
     return signature
예제 #2
0
    def clean_comment(self):
        comment = self.cleaned_data['comment']

        if is_spam(self.request, comment):
            raise forms.ValidationError("Your comment was considered spam, please edit and repost. If it keeps failing please contact the admins.")
        
        return comment
예제 #3
0
 def clean_about(self):
     about = self.cleaned_data['about']
     if is_spam(self.request, about):
         raise forms.ValidationError(
             "Your 'about' text was considered spam, please edit and resubmit. If it keeps "
             "failing please contact the admins.")
     return about
예제 #4
0
    def clean_comment(self):
        comment = self.cleaned_data['comment']

        if is_spam(self.request, comment):
            raise forms.ValidationError(
                "Your comment was considered spam, please edit and repost. If it keeps failing please contact the admins."
            )

        return comment
예제 #5
0
    def clean_sound_signature(self):
        sound_signature = self.cleaned_data['sound_signature']
        if is_spam(self.request, sound_signature):
            raise forms.ValidationError("Your sound signature was considered spam, please edit and resubmit. If it "
                                        "keeps failing please contact the admins.")
        if len(sound_signature) > 256:
            raise forms.ValidationError("Your sound signature must not exeed 256 chars, please edit and resubmit.")

        return sound_signature
예제 #6
0
    def clean_body(self):
        body = self.cleaned_data['body']

        if self.quote and body.strip() == self.quote:
            raise forms.ValidationError("You should type something...")

        if is_spam(self.request, body):
            raise forms.ValidationError("Your post was considered spam, please edit and repost. If it keeps failing please contact the admins.")

        return body
예제 #7
0
파일: forms.py 프로젝트: mrshu/freesound
 def clean_signature(self):
     signature = self.cleaned_data['signature']
     if is_spam(self.request, signature):
         raise forms.ValidationError("Your signature was considered spam, please edit and resubmit. If it keeps failing please contact the admins.")
     return signature
예제 #8
0
파일: forms.py 프로젝트: mrshu/freesound
 def clean_about(self):
     about = self.cleaned_data['about']
     if is_spam(self.request, about):
         raise forms.ValidationError("Your 'about' text was considered spam, please edit and resubmit. If it keeps failing please contact the admins.")
     return about