diff options
author | Aaron Williamson <aaron@copiesofcopies.org> | 2012-01-17 00:33:55 -0500 |
---|---|---|
committer | Aaron Williamson <aaron@copiesofcopies.org> | 2012-01-17 00:33:55 -0500 |
commit | 25b48323a86a1036112f2f33c889d5d12d5dee9c (patch) | |
tree | 99c61b9054fc631cb79c360c0ed0dc204b3fa496 /mediagoblin/submit | |
parent | 98308e61b627ccfa461ad11966ff236d974762e7 (diff) | |
download | mediagoblin-25b48323a86a1036112f2f33c889d5d12d5dee9c.tar.lz mediagoblin-25b48323a86a1036112f2f33c889d5d12d5dee9c.tar.xz mediagoblin-25b48323a86a1036112f2f33c889d5d12d5dee9c.zip |
First crack at basic license support.
Diffstat (limited to 'mediagoblin/submit')
-rw-r--r-- | mediagoblin/submit/forms.py | 5 | ||||
-rw-r--r-- | mediagoblin/submit/views.py | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/mediagoblin/submit/forms.py b/mediagoblin/submit/forms.py index 25d6e304..be85b9a9 100644 --- a/mediagoblin/submit/forms.py +++ b/mediagoblin/submit/forms.py @@ -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()) diff --git a/mediagoblin/submit/views.py b/mediagoblin/submit/views.py index 7134235e..ecfa9943 100644 --- a/mediagoblin/submit/views.py +++ b/mediagoblin/submit/views.py @@ -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'] |