First crack at basic license support.
This commit is contained in:
@@ -19,7 +19,7 @@ import wtforms
|
||||
|
||||
from mediagoblin.tools.text import tag_length_validator
|
||||
from mediagoblin.tools.translate import fake_ugettext_passthrough as _
|
||||
|
||||
from mediagoblin.tools.licenses import licenses_as_choices
|
||||
|
||||
class SubmitStartForm(wtforms.Form):
|
||||
file = wtforms.FileField(_('File'))
|
||||
@@ -31,3 +31,6 @@ class SubmitStartForm(wtforms.Form):
|
||||
tags = wtforms.TextField(
|
||||
_('Tags'),
|
||||
[tag_length_validator])
|
||||
license = wtforms.SelectField(
|
||||
_('License'),
|
||||
choices=licenses_as_choices())
|
||||
|
||||
@@ -60,6 +60,10 @@ def submit_start(request):
|
||||
entry['description'] = unicode(request.POST.get('description'))
|
||||
entry['description_html'] = cleaned_markdown_conversion(
|
||||
entry['description'])
|
||||
|
||||
entry['license'] = (
|
||||
unicode(request.POST.get('license'))
|
||||
or '')
|
||||
|
||||
entry['media_type'] = u'image' # heh
|
||||
entry['uploader'] = request.user['_id']
|
||||
|
||||
Reference in New Issue
Block a user