aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit/forms.py
diff options
context:
space:
mode:
authorCaleb Forbes Davis V <caldavis@gmail.com>2011-07-20 23:54:32 -0500
committerCaleb Forbes Davis V <caldavis@gmail.com>2011-07-21 00:02:57 -0500
commit909371cdceace162af880c275b9e6e70488e3029 (patch)
treebee23230d6ec4ea8fcc5918e0723c04af6845bfb /mediagoblin/edit/forms.py
parentcea8f2b632de13ca9b423ea97ee8f6abf3cd6ecb (diff)
downloadmediagoblin-909371cdceace162af880c275b9e6e70488e3029.tar.lz
mediagoblin-909371cdceace162af880c275b9e6e70488e3029.tar.xz
mediagoblin-909371cdceace162af880c275b9e6e70488e3029.zip
raises tag length error in form context instead of in message queue
Diffstat (limited to 'mediagoblin/edit/forms.py')
-rw-r--r--mediagoblin/edit/forms.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index 21c8509a..e7a86bba 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -16,6 +16,7 @@
import wtforms
+from mediagoblin.util import tag_length_validator, TOO_LONG_TAG_WARNING
class EditForm(wtforms.Form):
@@ -25,7 +26,9 @@ class EditForm(wtforms.Form):
slug = wtforms.TextField(
'Slug')
description = wtforms.TextAreaField('Description of this work')
- tags = wtforms.TextField('Tags')
+ tags = wtforms.TextField(
+ 'Tags',
+ [tag_length_validator])
class EditProfileForm(wtforms.Form):
bio = wtforms.TextAreaField('Bio',