Setting content type has become difficult.  I am still not sure how to
use
1. @expose (content_type = CUSTOM_CONTENT_TYPE)
     pylons.response.headers['Content-Type'] = 'text/xml'
vs
2. @expose (content_type = "text/xml", custom_format = "xml")
    use_custom_format ('xml')
vs
3.  @expose (content_type = "text/xml")



I could never  1 or 2 or 3 to work properly in tg2.0.X .. If somebody
has a good example or explanation I
would appreciate seeing it .


3 does work in tg2.1 but  does not work with nested functions i.e.

class RootController (BaseController):
     @expose ()
     def  test_l1 (self, *path, *kw):
          return self.testl2 (self)

     @expose (content_type="text/xml")
     def  test_l2 (self, *path, *kw):
          return "<xml/>"


A request to test_l1 will return with content_type "text/html"
Is there any way around this?


Thanks,
kris



--~--~---------~--~----~------------~-------~--~----~
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