I've managed to get the toscawidgets 0.1a2dev_r2777 demo running under pylons 0.9.4.1 (well with minor changes to use myghty). But I've encountered a weird bug. The POST request from the demo form shows up as GET on the server side, which cause the @validate to never execute. Obviously this causes an exception due to nonexistent form_result. I've verified with ethereal that the browser is actually sending a POST request to the server, but it shows up as GET in the server request dict. Here is the TCP stream reassembled by ethereal:
POST /myctrl/save HTTP/1.1 Host: localhost:5000 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/ 20070223 Fedora/1.5.0.10-1.fc5 Firefox/1.5.0.10 Accept: text/xml,application/xml,application/xhtml+xml,text/ html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://localhost:5000/myctrl/srvinfo Cookie: _session_id=ab3f0a9f5de533988489c53ca48af5f9; ppp=39007e3b53514b0de7b747867dbd71f5c8ff8d0b5f23b41304168789a83316e9 Content-Type: application/x-www-form-urlencoded Content-Length: 263 id=I%27m+hidden%21&name=Peter&age=2&email=peter %40example&date=2007%2F03%2F17+13%3A02&password=&password_confirm=&address-0.street=&address-0.number=&address-0.zip_code=&address-0.state=NY&address-1.street=&address-1.number=&address-1.zip_code=&address-1.state=NYHTTP/ 1.0 200 OK Server: PasteWSGIServer/0.5 Python/2.4.3 Date: Sat, 17 Mar 2007 17:25:16 GMT content-type: text/html; charset=UTF-8 Connection: close <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Validated data</title> </head> <body> <p> The form widget: </p> <p> <p>Hi, here's the server environment: <br/> {'HTTP_REFERER': 'http://localhost:5000/myctrl/srvinfo', 'paste.recursive.forward': <paste.recursive.Forwarder from />, 'pylons.routes_dict': {'action': 'save', 'controller': 'myctrl', 'id': None}, 'toscawidgets.show_apache_config': True, 'paste.recursive.include': <paste.recursive.Includer from />, 'SCRIPT_NAME': '', 'paste.parsed_formvars': (MultiDict([('id', "I'm hidden!"), ('name', 'Peter'), ('age', '2'), ('email', '[EMAIL PROTECTED]'), ('date', '2007/03/17 13:02'), ('password', ''), ('password_confirm', ''), ('address-0.street', ''), ('address-0.number', ''), ('address-0.zip_code', ''), ('address-0.state', 'NY'), ('address-1.street', ''), ('address-1.number', ''), ('address-1.zip_code', ''), ('address-1.state', 'NY')]), <socket._fileobject object at 0xb09185dc length=263>), 'REQUEST_METHOD': 'GET', 'PATH_INFO': '/ myctrl/save', 'SERVER_PROTOCOL': 'HTTP/1.1', 'QUERY_STRING': '', 'paste.throw_errors': True, 'CONTENT_LENGTH': '263', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv: 1.8.0.10) Gecko/20070223 Fedora/1.5.0.10-1.fc5 Firefox/1.5.0.10', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': '_session_id=ab3f0a9f5de533988489c53ca48af5f9; ppp=39007e3b53514b0de7b747867dbd71f5c8ff8d0b5f23b41304168789a83316e9', 'SERVER_NAME': '0.0.0.0', 'REMOTE_ADDR': '127.0.0.1', 'pylons.environ_config': {'cache': 'beaker.cache', 'session': 'beaker.session'}, 'paste.expected_exceptions': [<class paste.httpexceptions.HTTPException at 0xb714ddac>], 'wsgi.url_scheme': 'http', 'beaker.cache': <beaker.cache.CacheManager object at 0xb6d43eec>, 'paste.config': {'global_conf': {'error_email_from': '[EMAIL PROTECTED]', '__file__': '/home/vga/330/p2/ppp/development.ini', 'smtp_server': 'localhost', 'here': '/home/vga/330/p2/ppp', 'email_to': '[EMAIL PROTECTED]', 'debug': 'true'}, 'app_conf': {'sqlalchemy.dburi': 'postgres:///proj2', 'package': 'ppp', 'sqlalchemy.echo': 'true', 'session_secret': 'somesecret', 'cache_dir': '/home/vga/330/p2/ppp/data', 'session_data_dir': '/home/ vga/330/p2/ppp/data/sessions', 'cache_data_dir': '/home/vga/330/p2/ppp/ data/cache', 'session_key': 'ppp'}}, 'wsgiorg.routing_args': ((), {'action': 'save', 'controller': 'myctrl', 'id': None}), 'SERVER_PORT': '5000', 'toscawidgets.framework': <toscawidgets.mods.pylonshf.PylonsHostFramework object at 0xb08ac5ac>, 'paste.recursive.script_name': '', 'paste.evalexception': <pylons.error.PylonsEvalException object at 0xb6d4b10c>, 'wsgi.input': <socket._fileobject object at 0xb09185dc length=263>, 'HTTP_HOST': 'localhost:5000', 'beaker.session': {'_accessed_time': 1174152316.0575931, '_creation_time': 1174125342.9964049}, 'paste.recursive.include_app_iter': <paste.recursive.IncluderAppIter from />, 'wsgi.multithread': True, 'paste.httpexceptions': <paste.httpexceptions.HTTPExceptionHandler object at 0xb6d4b0ec>, 'HTTP_ACCEPT': 'text/xml,application/xml,application/ xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'wsgi.version': (1, 0), 'paste.registry': <paste.registry.Registry object at 0xb08ac56c>, 'toscawidgets.prefix': '/toscawidgets', 'wsgi.run_once': False, 'wsgi.errors': <paste.script.serve.LazyWriter object at 0xb7b9e26c>, 'wsgi.multiprocess': False, 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'paste.httpserver.thread_pool': <paste.httpserver.ThreadPool object at 0xb6d4ec2c>, 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_KEEP_ALIVE': '300'}</p> </p> </body> </html> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
