Does anyone have an example of uploading a file using FileWidget in form2?
My attempts have resulted in a NoneType object being in place of the forms
file entry. I'm not sure if I'm over looking something obvious, or if this
is maybe a known issue/limitation with the new form2? Thanks in advance!
-Charles
what I was trying:
class myForm(Form):
def __init__(self, **kwargs):
Form.__init__(self, **kwargs)
self.add(FileWidget, 'file', '', title='Upload file:',
size=30, required=True)
self.add_submit('go', 'Go')
class myUI:
def _q_index(self, req):
form = myForm()
content = ""
if not form.is_submitted():
content += form.render()
else:
content += str(form['file'])