hi all,
i'm somewhat stuck trying to avoid the deprecated tg_format parameter
in tg2.0.3.

i want to expose the data returned from a controller in different
content_types, in particular xhtml and kml. and since i request the
kml from javascript using GDownloadUrl [1] - which doesn't allow
specification of additional headers - i have to specify the mimetype
in the URL.

so trying to avoid tg_format, i appended ".kml" to the URL path. but
while request.response_type is correctly set to "application/
vnd.google-earth.kml+xml" (i guess because of the entry in mimetypes),
tg2 still fails to pick the correct template engine. this is because i
had to specify the content_type in the expose decorator as
"application/vnd.google-earth.kml+xml; charset=UTF-8", to make webob
not complain about a missing charset.

so the check in decorator.py line 121:
if hasattr(request, 'response_type') and request.response_type in
self.engines:
fails.

from my point of view, having a way to specify the charset for expose
in a separate parameter would do the trick - if that's propagated to
webob accordingly.

[1] http://code.google.com/apis/maps/documentation/reference.html#GDownloadUrl
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to