コード例 #1
0
ファイル: forms.py プロジェクト: rubenvereecken/olympia
 def clean_bio(self):
     bio = self.cleaned_data['bio']
     normalized = clean_nl(unicode(bio))
     if has_links(normalized):
         # There's some links, we don't want them.
         raise forms.ValidationError(_('No links are allowed.'))
     return bio
コード例 #2
0
ファイル: forms.py プロジェクト: pombredanne/olympia
 def clean_description(self):
     description = self.cleaned_data['description']
     normalized = clean_nl(description)
     if has_links(normalized):
         # There's some links, we don't want them.
         raise forms.ValidationError(_('No links are allowed.'))
     return description
コード例 #3
0
 def clean_bio(self):
     bio = self.cleaned_data['bio']
     normalized = clean_nl(unicode(bio))
     if has_links(normalized):
         # There's some links, we don't want them.
         raise forms.ValidationError(_('No links are allowed.'))
     return bio
コード例 #4
0
ファイル: forms.py プロジェクト: AALEKH/zamboni
 def clean_description(self):
     description = self.cleaned_data['description']
     normalized = clean_nl(description)
     if has_links(normalized):
         # There's some links, we don't want them.
         raise forms.ValidationError(_('No links are allowed.'))
     return description