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 #2380 (closed enhancement: fixed)

Opened 10 years ago

Last modified 10 years ago

Refactor template plugin options loading in view.load_engines

Reported by: Chris Arndt Owned by: Chris Arndt
Priority: normal Milestone: 1.1
Component: View Version: 1.1 HEAD
Severity: normal Keywords: view, template options
Cc:

Description

Currently, we only pass a fixed set of options, which is defined in view.base.load_engines, to template engine plugins and we pass all options to each plugin, whether it is meant for that particular plugin or not.

This is bad because:

  • If a template plugin adds a new option, it can not be set through the TurboGears configuration, unless support for it is added in load_engines.
  • Badly written templates may choke when we pass options to them they do not recognize.

Attachments

view-load-engine-options.diff Download (8.2 KB) - added by Chris Arndt 10 years ago.
Implements new template engine options loading mechanism

Change History

Changed 10 years ago by Chris Arndt

Implements new template engine options loading mechanism

comment:1 Changed 10 years ago by Chris Arndt

  • Keywords needs review, added
  • Status changed from new to assigned

comment:2 Changed 10 years ago by Chris Arndt

I didn't change the set of default options in the attached patch, but that can probably be reduced a bit.

comment:3 Changed 10 years ago by chrisz

Looks good, found only a small typo: evering -> everything.

comment:4 Changed 10 years ago by Chris Arndt

  • Status changed from assigned to closed
  • Keywords needs review, removed
  • Resolution set to fixed

Yes, corrected that already in my working copy. I have applied it now in r6756.

Note: See TracTickets for help on using tickets.