aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/submit/views.py
diff options
context:
space:
mode:
authorCaleb Forbes Davis V <caldavis@gmail.com>2011-07-27 14:42:09 -0500
committerCaleb Forbes Davis V <caldavis@gmail.com>2011-07-27 14:51:57 -0500
commit0712a06dc6d6b05cb78d4b10af12c051e8f765e3 (patch)
tree16feba97f0589fdf1c2811c23340f4a002a1ae47 /mediagoblin/submit/views.py
parent97e4498c10c803c9d239011d4c48efef52673ec3 (diff)
downloadmediagoblin-0712a06dc6d6b05cb78d4b10af12c051e8f765e3.tar.lz
mediagoblin-0712a06dc6d6b05cb78d4b10af12c051e8f765e3.tar.xz
mediagoblin-0712a06dc6d6b05cb78d4b10af12c051e8f765e3.zip
changes tags to a list of dicts in the db, adding tag slugs
- adds a function to convert the tag list of dicts to a text string properly delimited for loading into forms - tag string conversion function updated to generate list of dicts - updates all mentions of the conversion of the string to the tags db object - adds a tags template utility and updates the media template accordingly
Diffstat (limited to 'mediagoblin/submit/views.py')
-rw-r--r--mediagoblin/submit/views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mediagoblin/submit/views.py b/mediagoblin/submit/views.py
index edde4400..c5ac8c62 100644
--- a/mediagoblin/submit/views.py
+++ b/mediagoblin/submit/views.py
@@ -22,7 +22,7 @@ from werkzeug.utils import secure_filename
from mediagoblin.util import (
render_to_response, redirect, cleaned_markdown_conversion, \
- convert_to_tag_list)
+ convert_to_tag_list_of_dicts)
from mediagoblin.decorators import require_active_login
from mediagoblin.submit import forms as submit_forms, security
from mediagoblin.process_media import process_media_initial
@@ -62,7 +62,8 @@ def submit_start(request):
entry['uploader'] = request.user['_id']
# Process the user's folksonomy "tags"
- entry['tags'] = convert_to_tag_list(request.POST.get('tags'))
+ entry['tags'] = convert_to_tag_list_of_dicts(
+ request.POST.get('tags'))
# Save, just so we can get the entry id for the sake of using
# it to generate the file path