diff options
author | Caleb Forbes Davis V <caldavis@gmail.com> | 2011-07-12 20:06:17 -0500 |
---|---|---|
committer | Caleb Forbes Davis V <caldavis@gmail.com> | 2011-07-12 20:06:17 -0500 |
commit | cdf538bd6163a47b4c4a6326c943b6deaf2c495a (patch) | |
tree | 074a0316483ebd3dd34e016a97ac78195e661579 /mediagoblin/submit/forms.py | |
parent | 272469daf5eb53f2302ae3948dde4e40eaf12497 (diff) | |
download | mediagoblin-cdf538bd6163a47b4c4a6326c943b6deaf2c495a.tar.lz mediagoblin-cdf538bd6163a47b4c4a6326c943b6deaf2c495a.tar.xz mediagoblin-cdf538bd6163a47b4c4a6326c943b6deaf2c495a.zip |
adds filter function to parse and clean tags field input
- for some reason the tags are showing up in the media edit form
with u'..' and surrounded with []. I don't know why, grr
Diffstat (limited to 'mediagoblin/submit/forms.py')
-rw-r--r-- | mediagoblin/submit/forms.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mediagoblin/submit/forms.py b/mediagoblin/submit/forms.py index 0e0fd086..e13d5425 100644 --- a/mediagoblin/submit/forms.py +++ b/mediagoblin/submit/forms.py @@ -17,6 +17,8 @@ import wtforms +from mediagoblin.util import convert_to_tag_list + class SubmitStartForm(wtforms.Form): title = wtforms.TextField( @@ -24,4 +26,4 @@ class SubmitStartForm(wtforms.Form): [wtforms.validators.Length(min=0, max=500)]) description = wtforms.TextAreaField('Description of this work') file = wtforms.FileField('File') - tags = wtforms.TextField('Tags') + tags = wtforms.TextField('Tags', filters=[convert_to_tag_list]) |