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/edit/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/edit/forms.py')
-rw-r--r-- | mediagoblin/edit/forms.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py index b2d575cb..5e3aab96 100644 --- a/mediagoblin/edit/forms.py +++ b/mediagoblin/edit/forms.py @@ -17,6 +17,8 @@ import wtforms +from mediagoblin.util import convert_to_tag_list + class EditForm(wtforms.Form): title = wtforms.TextField( @@ -25,8 +27,7 @@ class EditForm(wtforms.Form): slug = wtforms.TextField( 'Slug') description = wtforms.TextAreaField('Description of this work') - tags = wtforms.TextField( - 'Tags') + tags = wtforms.TextField('Tags', filters=[convert_to_tag_list]) class EditProfileForm(wtforms.Form): bio = wtforms.TextAreaField('Bio', |