self.label = _('tags')
#self.help_text = _('please use space to separate tags (this enables autocomplete feature)')
self.help_text = _('Tags are short keywords, with no spaces within. At least one %(min)s and up to %(max)s tags can be used.') % {
- 'min': apnumber(settings.FORM_MIN_NUMBER_OF_TAGS), 'max': apnumber(settings.FORM_MAX_NUMBER_OF_TAGS)
+ 'min': settings.FORM_MIN_NUMBER_OF_TAGS, 'max': settings.FORM_MAX_NUMBER_OF_TAGS
}
self.initial = ''
list = split_re.split(data)
if len(list) > settings.FORM_MAX_NUMBER_OF_TAGS or len(list) < settings.FORM_MIN_NUMBER_OF_TAGS:
- raise forms.ValidationError(_('please use between %(min)s and %(max)s tags') % { 'min': apnumber(settings.FORM_MIN_NUMBER_OF_TAGS), 'max': apnumber(settings.FORM_MAX_NUMBER_OF_TAGS)})
+ raise forms.ValidationError(_('please use between %(min)s and %(max)s tags') % { 'min': settings.FORM_MIN_NUMBER_OF_TAGS, 'max': settings.FORM_MAX_NUMBER_OF_TAGS})
list_temp = []
tagname_re = re.compile(r'[a-z0-9]+')
for tag in list:
if len(tag) > settings.FORM_MAX_LENGTH_OF_TAG or len(tag) < settings.FORM_MIN_LENGTH_OF_TAG:
- raise forms.ValidationError(_('please use between %(min)s and %(max)s characters in you tags') % { 'min': apnumber(settings.FORM_MIN_LENGTH_OF_TAG), 'max': apnumber(settings.FORM_MAX_LENGTH_OF_TAG)})
+ raise forms.ValidationError(_('please use between %(min)s and %(max)s characters in you tags') % { 'min': settings.FORM_MIN_LENGTH_OF_TAG, 'max': settings.FORM_MAX_LENGTH_OF_TAG})
if not tagname_re.match(tag):
raise forms.ValidationError(_('please use following characters in tags: letters \'a-z\', numbers, and characters \'.-_#\''))
# only keep one same tag