displays the tags on edit correctly now
-before it was running the tags field through the submit filter. that was kind of dumb -removes the filter function from the edit form -adds unicode syntax in the filter function -uses split correctly when saving the edited tags to mongodb
This commit is contained in:
@@ -27,7 +27,7 @@ class EditForm(wtforms.Form):
|
||||
slug = wtforms.TextField(
|
||||
'Slug')
|
||||
description = wtforms.TextAreaField('Description of this work')
|
||||
tags = wtforms.TextField('Tags', filters=[convert_to_tag_list])
|
||||
tags = wtforms.TextField('Tags')
|
||||
|
||||
class EditProfileForm(wtforms.Form):
|
||||
bio = wtforms.TextAreaField('Bio',
|
||||
|
||||
@@ -62,7 +62,7 @@ def edit_media(request, media):
|
||||
media['description']))
|
||||
|
||||
media['slug'] = request.POST['slug']
|
||||
media['tags'] = split(request.POST['tags'])
|
||||
media['tags'] = request.POST['tags'].split(TAGS_DELIMITER)
|
||||
media.save()
|
||||
|
||||
return redirect(request, "mediagoblin.user_pages.media_home",
|
||||
|
||||
Reference in New Issue
Block a user