Changeset 278

Show
Ignore:
Timestamp:
12/03/05 15:17:18 (3 years ago)
Author:
kevin
Message:

moving transaction boundary so that it is after output is processed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG.txt

    r272 r278  
    1010  turn on JSON via the config file or by the allow_json parameter 
    1111  to expose. 
     12* turbogears.controllers.Root has now become  
     13  turbogears.controllers.RootController for clarity's sake. 
    1214   
    1315*Features* 
  • trunk/turbogears/controllers.py

    r266 r278  
    144144    @type: turbogears.widgets.forms.Form 
    145145    """ 
    146     import controllers 
    147146    if template: 
    148147        html = template 
     
    196195                cherrypy.request.in_transaction = True 
    197196                output = database.run_with_transaction(_execute_func, self, 
    198                         errors, errorhandler, func, *args, **kw) 
     197                        errors, errorhandler, func, tg_format, 
     198                        html, *args, **kw) 
    199199            else: 
    200200                output = _execute_func(self, errors, errorhandler, func, 
    201                             *args, **kw) 
    202             return controllers._process_output(tg_format, output, html) 
     201                            tg_format, html, *args, **kw) 
     202            return output 
    203203             
    204204        try: 
     
    211211    return decorator 
    212212 
    213 def _execute_func(self, errors, errorhandler, func, *args, **kw): 
     213def _execute_func(self, errors, errorhandler, func, tg_format, 
     214                  html, *args, **kw): 
    214215    if errors: 
    215216        if errorhandler: 
     
    224225        else: 
    225226            output = func(self, *args, **kw) 
    226     return output 
     227    return _process_output(tg_format, output, html) 
    227228     
    228229