Re: RELEASED: Quixote-2.1, and updates of other packages.
Damjan <[email protected]>
| Newsgroups | gmane.comp.web.quixote.user |
|---|---|
| Message-ID | <[email protected]> |
[ This message was first sent, by mistake, to David Binger only, when it was ment for this mail list ] >> On behalf of the MEMS Exchange, I am pleased to announce >> the release of Quixote 2.1. >> http://www.mems-exchange.org/software/quixote/ > > It still has this stupid function in http_response.py The problem with the _encode_chunk function is that this simple example (script atached) doesn't work when a non-ascii characters are entered in the form. ie it raises the "UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 297: ordinal not in range(128)" exception. And I don't see what my application could do to correct this behaviour. -- damjan | дамјан This is my jabber ID --> [email protected] <-- not my mail address!!! _______________________________________________ Quixote-users mailing list [email protected] http://mail.mems-exchange.org/mailman/listinfo/quixote-users
formtest.py
(text/plain, 805 B)
# -*- coding: utf-8 -*-
#from quixote import enable_ptl
#enable_ptl()
from quixote.publish import Publisher
from quixote.directory import Directory
from quixote.form import Form, StringWidget
from quixote.server import simple_server
from quixote import get_response
def create_publisher():
return Publisher(RootDirectory(), display_exceptions='plain')
class RootDirectory(Directory):
_q_exports = [""]
def _q_index(self):
get_response().set_charset('utf-8')
form = Form()
form.add(StringWidget, "name", title="Your Name", size=20, required=True)
form.add(StringWidget, "email", title="Email address", size=20, required=True)
form.add_submit("go", "Go!")
return form.render()
simple_server.run(create_publisher, host="127.0.0.1", port=8080)