#1070: [PATCH] for controllers to override the 'format' via returned dict's
'tg_format'
----------------------+-----------------------------------------------------
Reporter: dalke | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: CherryPy | Version: 0.9a5
Severity: normal | Keywords:
----------------------+-----------------------------------------------------
The comment at the bottom of
http://trac.turbogears.org/turbogears/ticket/341 states
"""To output XML, use the XML serializer. To do this, just add
tg_format="xml" to the dict which you return from your controller."""
I found no mention of "tg_format" in the documentation though.
I needed this feature because I have a controller method which looks at
the "format" form variable and decides for itself if it should return XML,
text, json, etc. (See ticket 1066 for the patch to support the parameter
named 'format' in the query string.)
I added the "tg_format": "xml" to the returned dictionary but that did not
work. Included is the one line patch to make it work. Or rather it will
be .. looks like I need to start a ticket before I can attach files.
Grr...
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/1070>
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
-~----------~----~----~----~------~----~------~--~---