Skip to content

Commit ae326df

Browse files
hrchrc
authored andcommitted
fix in accepting answer and applied a patch by ekallinin
1 parent f989d09 commit ae326df

File tree

4 files changed

+87
-88
lines changed

4 files changed

+87
-88
lines changed

.idea/workspace.xml

Lines changed: 67 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

forum/forms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ def clean(self, value):
6565
list_temp = []
6666
if len(list) > 5:
6767
raise forms.ValidationError(_('please use 5 tags or less'))
68+
69+
tagname_re = re.compile(r'[a-z0-9]+')
6870
for tag in list:
6971
if len(tag) > 20:
7072
raise forms.ValidationError(_('tags must be shorter than 20 characters'))
71-
#take tag regex from settings
72-
tagname_re = re.compile(r'[a-z0-9]+')
7373
if not tagname_re.match(tag):
7474
raise forms.ValidationError(_('please use following characters in tags: letters \'a-z\', numbers, and characters \'.-_#\''))
7575
# only keep one same tag

0 commit comments

Comments
 (0)