F360(tagging) - adds tag fields for submission, edit and display
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user