Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2519 (closed defect: migrated)

Opened 9 years ago

Last modified 8 years ago

TG2 expose() does not allow passing options to the render function

Reported by: chrisz Owned by:
Priority: normal Milestone: 2.2b1
Component: TurboGears Version: 2.2
Severity: normal Keywords: template expose render
Cc:

Description

In TG1 the expose decorator passed the format and fragment parameters as well as any further options on to the render function, but in TG2 the expose decorator accepts none of these.

Therefore, for instance, you cannot set the Genshi engine method parameter (xml, html, xhtml or text) for individual controllers (see #2506). I have checked in patches to attenuate this problem by guessing the method from the response content-type and using a default value from the config, but the more general and flexible solution would be to pass such rendering options from the expose decorator to the engine again.

Change History

comment:1 Changed 9 years ago by percious

  • Version changed from 2.0b7 to 2.2
  • Milestone changed from 2.1 to 2.2b1

comment:2 Changed 8 years ago by pedersen

  • Status changed from new to closed
  • Resolution set to migrated
Note: See TracTickets for help on using tickets.