aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit/forms.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-08-10 19:53:37 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-08-10 19:53:37 -0500
commit852d5bb2387706c11925fa0c2abe4a1f34708f16 (patch)
treedf5e6a3108d2ba007112b558ff65bbfabd88020c /mediagoblin/edit/forms.py
parent6b9ee0ca13b99ee20f9d0c680a950c6a7494a5a0 (diff)
parent6d794f268bb1f5d3cc56c5f0dc902571d48ebeac (diff)
downloadmediagoblin-852d5bb2387706c11925fa0c2abe4a1f34708f16.tar.lz
mediagoblin-852d5bb2387706c11925fa0c2abe4a1f34708f16.tar.xz
mediagoblin-852d5bb2387706c11925fa0c2abe4a1f34708f16.zip
Merge branch 'master' into processing
Diffstat (limited to 'mediagoblin/edit/forms.py')
-rw-r--r--mediagoblin/edit/forms.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index 0ed52af1..2f3ed203 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -17,20 +17,27 @@
import wtforms
+from mediagoblin.util import tag_length_validator, TOO_LONG_TAG_WARNING
+from mediagoblin.util import fake_ugettext_passthrough as _
+
class EditForm(wtforms.Form):
title = wtforms.TextField(
- 'Title',
+ _('Title'),
[wtforms.validators.Length(min=0, max=500)])
slug = wtforms.TextField(
- 'Slug',
- [wtforms.validators.Required(message="The slug can't be empty")])
+ _('Slug'),
+ [wtforms.validators.Required(message=_("The slug can't be empty"))])
description = wtforms.TextAreaField('Description of this work')
+ tags = wtforms.TextField(
+ _('Tags'),
+ [tag_length_validator])
class EditProfileForm(wtforms.Form):
- bio = wtforms.TextAreaField('Bio',
+ bio = wtforms.TextAreaField(
+ _('Bio'),
[wtforms.validators.Length(min=0, max=500)])
url = wtforms.TextField(
- 'Website',
+ _('Website'),
[wtforms.validators.Optional(),
- wtforms.validators.URL(message='Improperly formed URL')])
+ wtforms.validators.URL(message=_('Improperly formed URL'))])