diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2010-07-18 15:21:51 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2010-07-18 15:21:51 -0500 |
commit | bda3405342feb7f239ccaa2e7cebe76a48909309 (patch) | |
tree | 4350476d4c4989863d3b61d88590373d39fdbcb7 /mediagoblin/views.py | |
parent | fbf7880e6873a541da5f45f90d9e0fd31119514a (diff) | |
download | mediagoblin-bda3405342feb7f239ccaa2e7cebe76a48909309.tar.lz mediagoblin-bda3405342feb7f239ccaa2e7cebe76a48909309.tar.xz mediagoblin-bda3405342feb7f239ccaa2e7cebe76a48909309.zip |
Still totally useless but at least it writes to the database
Diffstat (limited to 'mediagoblin/views.py')
-rw-r--r-- | mediagoblin/views.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mediagoblin/views.py b/mediagoblin/views.py index ef0fddad..116237b7 100644 --- a/mediagoblin/views.py +++ b/mediagoblin/views.py @@ -1,3 +1,5 @@ +import datetime + from webob import Response, exc import wtforms @@ -17,7 +19,11 @@ def submit_test(request): image_form = ImageSubmitForm(request.POST) if request.method == 'POST' and image_form.validate(): # create entry and save in database - + work_id = request.app.db.works.insert( + {'title': image_form.title.data, + 'created': datetime.datetime.now(), + 'description': image_form.description.data}) + # save file to disk ## TODO |