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