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 #360 (closed defect: wontfix)

Opened 13 years ago

Last modified 12 years ago

TurboCheetah has problems with extended templates

Reported by: bergraj@… Owned by: anonymous
Priority: normal Milestone:
Component: TurboGears Version:
Severity: major Keywords:
Cc:

Description

When an extended template is viewed the first time (meaning the first time since the TurboGears server runs) an ImportError? is raised.

How to reconstruct:

  • create a master template e. g. master.tmpl
  • create a template that extends the master template e. g. welcome.tmpl
  • compile those templates with cheetah c -R
  • let TurboGears serve welcome.tmpl
  • start TurboGears and point your browser at the url associated with welcome.tmpl

Attachments

master.tmpl Download (530 bytes) - added by bergraj@… 13 years ago.
welcome.tmpl Download (1.1 KB) - added by bergraj@… 13 years ago.
Traceback Download (1.7 KB) - added by anonymous 13 years ago.

Change History

Changed 13 years ago by bergraj@…

Changed 13 years ago by bergraj@…

Changed 13 years ago by anonymous

comment:1 Changed 13 years ago by kevin

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone 0.9 deleted

Yep. This is currently expected behavior. You can get around this by:

  1. adding your template name to turbogears.view.baseTemplates.
  2. calling turbogears.view.loadBaseTemplates()

This is all a matter of the fact that the template has not been loaded/converted to Python. If you precompile your templates, it would likely work.

comment:2 Changed 13 years ago by anonymous

  • Status changed from closed to reopened
  • Resolution wontfix deleted

comment:3 Changed 13 years ago by anonymous

  • Status changed from reopened to closed
  • Resolution set to wontfix

comment:4 Changed 12 years ago by chrisz

With TurboCheetah? 1.0 you can also set the config option cheetah.importhooks = True to automagically compile extended templates.

Note: See TracTickets for help on using tickets.