Nearly complete support for Tags

These changes allow all of the rest of the code to use tags
in sql as they were used on mongo. It's not efficient at
all, as changing tags usually means to remove all old tags
and adding all new.

The only problem here is: Old slugs for tags are not
removed, because they're shared across all MediaTags and
dropping orphans is not always easy.
This commit is contained in:
Elrond
2012-01-04 22:00:44 +01:00
parent ebc0e38239
commit de91730336
4 changed files with 54 additions and 6 deletions

View File

@@ -69,7 +69,7 @@ def edit_media(request, media):
else:
media.title = unicode(request.POST['title'])
media.description = unicode(request.POST.get('description'))
media['tags'] = convert_to_tag_list_of_dicts(
media.tags = convert_to_tag_list_of_dicts(
request.POST.get('tags'))
media.description_html = cleaned_markdown_conversion(