On Jan 19, 2007, at 12:40 AM, Damjan wrote:
Why not let controllers return dicts always, and then TG can mashup
everything together (the dict, headers, templates, etc...) on the way
out.
I probably didn't make a point clear, when I said "exposed
controller methods" I was refereing to @expose *decorated* controller
methods. The expose decorator is taking care of setting some headers
and turning that dict into serialized output behind the scenes so
what you're asking for is exactly what is happening now :)
Why does the controller need to return anything directly to the user
agent?
It's not doing it actually. After TG's expose takes care of
marshalling the dict controllers return, CherryPy takes care of
placing it in the response body and send appropiate headers to the
browser. The stack looks like this
controller_method -> turbogears.expose -> cherrypy -> user agent
(returns dict or str) -> (returns str) -> (creates WSGI
reponse)
Alberto
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---