Kevin Dangoor <[EMAIL PROTECTED]> writes:
> Yes, I forgot to mention that the tests are good docs for some of the
> possibilities here. They're not quite as readable, because they're
> Python 2.3 compatible, but the ideas are there.
Wow... They are quite messy, indeed... :-\
I'm not being successful with this new implementation. After adding tg_errors
to my methods (like in the test cases, but unlike the Trac ticket), I am
getting this:
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0beta-py2.4.egg/cherrypy/_cphttptools.py",
line 99, in _run
self.main()
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0beta-py2.4.egg/cherrypy/_cphttptools.py",
line 247, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in index
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
line 215, in expose
func, tg_format, html, fragment, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/database.py",
line 193, in run_with_transaction
retval = func(*args, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
line 243, in _execute_func
output = dispatch_error(func, self, **kw)
File "<string>", line 5, in dispatch_error
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
line 295, in _default_error_handler
return getattr(self, error_source.__name__ )(**kw)
File "<string>", line 3, in index
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
line 211, in expose
output = _execute_func(self, func, tg_format, html, fragment, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
line 240, in _execute_func
raise error
TypeError: expose() got multiple values for keyword argument 'self'
--
Jorge Godoy <[EMAIL PROTECTED]>