Jorge Vargas schrieb: > On Fri, May 23, 2008 at 11:00 AM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I'm getting troubles using TW in TG11 as widgets. Funnily enough I made >> it work at work - but here on my notebook, it fails. The reason is >> simple: ToscaWidgets registers a template lookup-thingy that doesn't get >> passed the directories to search. >> >> Thus the lookup fails. >> >> Apart from installing tw & twForms and freshly creating a TG11-project, >> I've put this into my controller: >> >> from toscawidgets.api import Widget >> >> >> class MakoWidget(Widget): >> params = ['count'] >> template = "toscawidgettest.templates.mako_widget" >> engine_name = "mako" >> >> mako_widget = MakoWidget(count=100) >> >> >> Trying this to render gives me >> >> http://paste.turbogears.org/paste/2726 >> >> as an exception. >> >> Any suggestions? >> > I had a simular problem when I tested TW with plain pylons. The > problem is that TW tries to emulate genshi's lookup on top of mako and > it changes mako.directories to be any searchable egg path. If I recall > correctly I fixed it passing the template_paths var in the pylons host > framework > http://beta.toscawidgets.org/hg/ToscaWidgets-dev/file/9abedebb0e46/tw/mods/pylonshf.py#l26 > > although looking that the tg hostframework I don't see a clean way to > fix it. as the param isn't there. > > As a side note, did you change your TG view to mako? looking at the > traceback it's going into genshi and then to mako.
No, I didn't - because it's only meant for a widget to be mako, not as default. Hm, I will investigate this on monday at work - for some reason, it works there. OTOH other stuff doesn't - testing my app seems not to pick up the application config. Strange world... Diez --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
