Ticket #1798 (new defect)

Opened 1 month ago

Last modified 1 month ago

Stop using buffet

Reported by: mramm Assigned to: anonymous
Priority: high Milestone: 2.0-preview-1
Component: TurboGears Version: trunk
Severity: normal Keywords:
Cc:

Description

We need to stop using pylons.buffet because it's being deprecated.

Pylons now as render_gensh and render_mako functions and instructions on how to write your own renderer. We should pick up on this.

But we need a generic render function which takes an engine parameter and calls the correct renderer.

The renderers dictionary should be setup in environment.py with standard renderers setup by default

 {'genshi':render_genshi, 'mako':render_mako'} 

Ideally we will still support the 'enginename:templatelocation" syntax from TG1, but throw a deprecation warning asking people to pass these in as separate parameters in expose.

if no engine name is passed in to @expose and they aren't declaring it using the above legacy syntax, we should use the default from the config.

which should also be setup in environment.py

Change History

04/19/08 09:40:51 changed by mramm

  • milestone changed from 2.0 to 2.0-preview-1.