Heya guys.
r1686:
Index: branches/1.0/turbogears/widgets/base.py
===================================================================
--- branches/1.0/turbogears/widgets/base.py (revision 1549)
+++ branches/1.0/turbogears/widgets/base.py (revision 1686)
@@ -224,5 +224,5 @@
# update_data has been deprecated
self.update_data(params)
- return view.transform(params, template=self.template_c)
+ return view.engines.get('kid').transform(params,
self.template_c)
Makes sense to me as widgets are kid-only.
However, the engines are usually lazily loaded upon the first call to
view.transform (via _choose_engine). So as long as your app calls
view.transform before a widget's display method is called, you're ok,
as the engines will be loaded.
However for simple widgets tests, view.transform is not called first,
just the widgets display method. Thus view.engines is unpopulated,
view.engines.get('kid') returns None and an exception is thrown.
I'm not sure of the best way to fix this.
Is there a particular advantages to engines being lazily loaded? Can we
explicitly load them at module import? Or would it be better to add a
public function to get an specific engine that calls _load_engines?
Shall I open a ticket?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk
-~----------~----~----~----~------~----~------~--~---