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/views.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/views.py')
-rw-r--r-- | mediagoblin/edit/views.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py index 96cb4be3..f5e7f454 100644 --- a/mediagoblin/edit/views.py +++ b/mediagoblin/edit/views.py @@ -19,7 +19,8 @@ from webob import exc from string import split from mediagoblin import messages -from mediagoblin.util import render_to_response, redirect, clean_html +from mediagoblin.util import render_to_response, redirect, clean_html, \ + TAGS_DELIMITER from mediagoblin.edit import forms from mediagoblin.edit.lib import may_edit_media from mediagoblin.decorators import require_active_login, get_user_media_entry @@ -37,7 +38,7 @@ def edit_media(request, media): title = media['title'], slug = media['slug'], description = media['description'], - tags = ' '.join(media['tags'])) + tags = TAGS_DELIMITER.join(media['tags'])) if request.method == 'POST' and form.validate(): # Make sure there isn't already a MediaEntry with such a slug |