On Jul 30, 2007, at 10:17 PM, Walter Cruz wrote:
>
> Hi Neil.
>
> An example, using a form that i have build. How can I pass a accented
> char to form and don't get a 'Internal Server Error'?
>
> []'s
> - Walter
>
> # -*- coding: utf-8 -*-
> """
> Simplest WSGI app using Paste and ToscaWidgets
>
> Based on script by James Gardner
> """
> from pkg_resources import require
> require('Paste', 'twForms >= 0.1a2dev_r2479')
>
> import formencode
> from pprint import pformat, pprint
> from genshi.template import Context, MarkupTemplate
> from genshi.output import DocType
> from formencode import Invalid
> from paste.wsgiwrappers import WSGIRequest
> from toscawidgets.widgets.forms import calendars
>
> from toscawidgets.api import retrieve_resources, WidgetsList
> from toscawidgets.widgets.forms import TableForm,HiddenField,
> TextField,SingleSelectField
>
> class UsuarioToscaForm(TableForm):
> class fields(WidgetsList):
> id = HiddenField(default=0)
> matricula = TextField(label_text = u'Matr�cula', validator =
> formencode.validators.UnicodeString(not_empty=True))
> (......)
I believe this is related to the issue discussed in this thread [1].
Try using toscawidgets.widgets.forms.validadors.UnicodeString instead
of the one provided by formencode.
HTH,
Alberto
[1] http://tinyurl.com/3dgqzq
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---