From cdf538bd6163a47b4c4a6326c943b6deaf2c495a Mon Sep 17 00:00:00 2001 From: Caleb Forbes Davis V Date: Tue, 12 Jul 2011 20:06:17 -0500 Subject: 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 --- mediagoblin/submit/forms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mediagoblin/submit') 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]) -- cgit v1.2.3