~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wlprofile/forms.py

  • Committer: franku
  • Date: 2016-05-15 14:41:54 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: somal@arcor.de-20160515144154-00m3tiibyxm0nw2w
added the old threadedcomments app as wildelands app

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    def clean_signature(self):
33
33
        value = self.cleaned_data['signature'].strip()
34
34
        if len(re.findall(r'\n', value)) > settings.SIGNATURE_MAX_LINES:
35
 
            raise forms.ValidationError('Number of lines is limited to %d' % _settings.SIGNATURE_MAX_LINES)
 
35
            raise forms.ValidationError('Number of lines is limited to %d' % settings.SIGNATURE_MAX_LINES)
36
36
        if len(value) > settings.SIGNATURE_MAX_LENGTH:
37
37
            raise forms.ValidationError('Length of signature is limited to %d' % settings.SIGNATURE_MAX_LENGTH)
38
38
        return value