F360(tagging) - adds tag fields for submission, edit and display

This commit is contained in:
Caleb Forbes Davis V
2011-07-08 01:59:44 -05:00
parent e6fd112d42
commit 04a9515064
6 changed files with 14 additions and 1 deletions

View File

@@ -24,3 +24,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')

View File

@@ -16,6 +16,7 @@
from os.path import splitext
from cgi import FieldStorage
from string import split
from werkzeug.utils import secure_filename
@@ -58,6 +59,7 @@ def submit_start(request):
entry['media_type'] = u'image' # heh
entry['uploader'] = request.user['_id']
entry['tags'] = split(request.POST.get('tags'))
# Save, just so we can get the entry id for the sake of using
# it to generate the file path