On Wed, Feb 25, 2009 at 5:17 AM, Cito <[email protected]> wrote: > > On 9 Feb., 17:47, Nick Murdoch <[email protected]> wrote: >> I've been playing around with TG2 on a prototype project with the view >> of using it for a real project if it supports everything I need. >> >> Currently I'm having trouble finding how I can >> >> * change Genshi's output between HTML and XHTML. >> * change the Genshi default output encoding >> * Make sure that the HTTP headers returned in the response match the >> two items above. >> * Make sure that incoming query string parameters are decoded to >> unicode strings using the same encoding. >> * Be able to access the encoding used in my functions >> >> So far I've spent about two hours reading through docs and source and >> haven't been able to find any of this out. > > Same for me. Can anybody shed some light on this? > ok I'll bite.
first remember the original feature was a buffet thing which as you all know it's deprecated. (I'll use the tag to keep links sane for the future) That said option 1 turn buffet on. set use_legacy_renderer in app_cfg.py that will allow your code to call setup_default_renderer http://trac.turbogears.org/browser/tags/2.0b5/tg/configuration.py#L375 and you can set the values you wan to send to genshi in config['buffet.template_options'].update(options) http://trac.turbogears.org/browser/tags/2.0b5/tg/configuration.py#L397 option 2 Umm I'm not sure if it's possible without patching some code. Or adding it locally. You will have to add your own renderer that will wrap the original one. as the **kargs passed there will be send to genshi http://trac.turbogears.org/browser/tags/2.0b5/tg/render.py#L111 and write something similar to http://trac.turbogears.org/browser/tags/2.0b5/tg/configuration.py#L333 that will load your renderer. > -- Christoph > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

