#740: tg_format parameter causing problems with JSON requests
---------------------+------------------------------------------------------
 Reporter:  godoy    |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  high     |   Milestone:  0.9a5    
Component:  Widgets  |     Version:           
 Severity:  major    |    Keywords:           
---------------------+------------------------------------------------------
 As reported by me, Michele and other users on the mailing list, and that
 can be reproduced on the Widget Browser (inside toolbox) at the
 AutoCompleteField demo -- last demo -- is that it isn't stripping out
 "tg_format" parameter.

 From running the toolbox, I get the following Traceback, that prevents the
 widget from working:

 {{{
 09/Apr/2006:17:05:09 HTTP INFO Page handler: <bound method
 AutoCompleteDesc.search of AutoCompleteDesc(name='Auto Complete',
 for_widget=AutoCompleteField(name='state',
 search_controller='turbogears.widgets.AutoCompleteField/search',
 result_name='states', field_class='autocompletefield', only_suggest=False,
 search_param='statename', attrs={}))>
 Traceback (most recent call last):
   File "/usr/lib/python2.4/site-
 packages/CherryPy-2.2.0-py2.4.egg/cherrypy/_cphttptools.py", line 106, in
 _run
     self.main()
   File "/usr/lib/python2.4/site-
 packages/CherryPy-2.2.0-py2.4.egg/cherrypy/_cphttptools.py", line 255, in
 main
     body = page_handler(*virtual_path, **self.params)
   File "<string>", line 3, in search
   File
 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 206, in expose
     output = database.run_with_transaction(expose._expose,func, accept,
 allow_json, allow_json_from_config,*args, **kw)
   File
 "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/database.py",
 line 216, in run_with_transaction
     retval = func(*args, **kw)
   File "<string>", line 5, in _expose
   File
 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 223, in <lambda>
     lambda _func, accept,  allow_json, allow_json_from_config,*args, **kw:
 _execute_func(
   File
 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 250, in _execute_func
     output = errorhandling.try_call(func, *args, **kw)
   File
 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py",
 line 71, in try_call
     output = func(self, *args, **kw)
 TypeError: search() got an unexpected keyword argument 'tg_format'
 }}}

 This was tested with:

 {{{
 TurboGears 0.9a5dev-r1108
 nose 0.8.4
 RuleDispatch 0.5a0
 setuptools 0.6a11
 FormEncode 0.4
 cElementTree 1.0.5-20051216
 PasteScript 0.5
 elementtree 1.2.6
 simplejson 1.1
 SQLObject 0.7.1dev-r1682
 CherryPy 2.2.0
 TurboKid 0.9.4dev-r1090
 TurboJson 0.9.2dev-r1093
 PyProtocols 1.0a0
 Cheetah 1.0
 PasteDeploy 0.3
 Paste 0.5
 FormEncode 0.4
 kid 0.9
 elementtree 1.2.6
 }}}

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/740>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" 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-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to