http://pastie.org/409292
On Mar 6, 1:30 pm, Alex K <[email protected]> wrote: > class upload: > def GET(self): > yield r'''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 > Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- > transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta http-equiv="Content-Type" content="text/html; > charset=utf-8" /> > </head> > <body> > <form action="" enctype="multipart/form-data" > method="post">''' > yield self.form().render_css() > yield '<form action="" enctype="multipart/form-data" > method="post">' > yield '</form></body></html>' > > def POST(self): > f = self.form() > f.validates() > return 'You will never see this text if you upload a file.' > > def form(self): > return form.Form( > form.File('resume_fn', > form.notnull, > description='It will take forever if we validate the > form'), > form.Button('submit', type='submit', value='Apply')) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
