2009-03-21 | Paul Boddie | raw annotate files changeset graph | Added support for file uploads, employing a special list of files as part of the forms dictionary, and using a file namespace in order to provide special attributes which refer to entries in the files list. Extended the candidate example to support picture uploads. |
1 #!/usr/bin/env python 2 3 from WebStack.Adapters.BaseHTTPRequestHandler import deploy 4 import Questionnaire 5 6 # Get a simple Web site. 7 8 resource = Questionnaire.get_site() 9 10 # Special magic incantation. 11 12 print "Serving..." 13 deploy(resource, handle_errors=0) 14 15 # vim: tabstop=4 expandtab shiftwidth=4