Those tests look like good examples. I will take some time to study
them. Thanks! I'll post here what I've tried so far, in the hopes that
someone will recognize the problem--otherwise I will continue to work
on the problem and post the solution here when I find it.

My first attempt to fix this problem was using
@validate(validators=Schema), as this was described in the
DeprecationWarning of @expose. I got a traceback. It is worth noting
that now I get the same traceback even when I use the deprecated
@expose(validators=...).

I tried like this:

    @turbogears.expose()
    @turbogears.validate(validators=setEmailForwardSchema)
    def setEmailForward(self, ...

I get this traceback:

Page handler: <bound method Root.setEmailForward of
<ctiwebmin.controllers.Root object at 0x01040A10>>
Traceback (most recent call last):
  File
"c:\python24\lib\site-packages\CherryPy-2.2.0betadev_r980-py2.4.egg\cherrypy\_cphttptools.py",
line 99, in _run
    self.main()
  File
"c:\python24\lib\site-packages\CherryPy-2.2.0betadev_r980-py2.4.egg\cherrypy\_cphttptools.py",
line 248, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in setEmailForward
  File
"c:\python24\lib\site-packages\TurboGears-0.9a1-py2.4.egg\turbogears\controllers.py",
line 210, in expose
    tg_format, html, fragment, *args, **kw)
  File
"c:\python24\lib\site-packages\TurboGears-0.9a1-py2.4.egg\turbogears\database.py",
line 193, in run_with_transaction
    retval = func(*args, **kw)
  File
"c:\python24\lib\site-packages\TurboGears-0.9a1-py2.4.egg\turbogears\controllers.py",
line 228, in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File
"c:\python24\lib\site-packages\TurboGears-0.9a1-py2.4.egg\turbogears\errorhandling.py",
line 63, in try_call
    output = func(self, *args, **kw)
  File "<string>", line 3, in setEmailForward
  File
"c:\python24\lib\site-packages\TurboGears-0.9a1-py2.4.egg\turbogears\controllers.py",
line 136, in validate
    errors.update(error.unpack_errors())
ValueError: dictionary update sequence element #0 has length 1; 2 is
required


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to