1 from webob
import Response
, exc
4 def root_view(request
):
5 return Response("This is the root")
8 class ImageSubmitForm(wtforms
.Form
):
9 title
= wtforms
.TextField(
11 [wtforms
.validators
.Length(min=1, max=500)])
12 description
= wtforms
.TextAreaField('Description of this work')
13 file = wtforms
.FileField('File')
16 def submit_test(request
):
17 image_form
= ImageSubmitForm(request
.POST
)
18 if request
.method
== 'POST' and image_form
.validate():
19 # create entry and save in database
25 ## Hm. This should be done on a separate view?
31 template
= request
.template_env
.get_template(
32 'mediagoblin/test_submit.html')
36 'image_form': image_form
}))