It should work if you use the Render class instead of calling Template directly -- currently "Template" is just a stub object that allows for compatibility with the old Templetor's `Template.globals` interface.
What exactly is "dicttable_t" in your code? Are you trying to compile a template from an in-memory block of text instead of a file? If so, you should be able to do that with the TTwain.process() function. I should work on making it drop-in compatible with the current Templetor... though I don't know how far I ought to go. Just the main public interfaces like the render class (already done) and the Template class? Or a more comprehensive bridge, mapping instance variables, etc. to their equivalents in my implementation? On 14 Dec 2007, at 18:03, Aaron Gyes wrote: > Hi, > > I recently switched to web.py 0.3 from bzr with no real issues. TTwain > seems to be reasonably nicer, so I thought I'd try that too. I ripped > out template.py and replaced it with a template directory with the > code from Adam Atlas' SVN repo, but it doesn't work. > > Traceback (most recent call last): > File "./floamcms.py", line 3, in <module> > import web, markdown2 > File "/Users/floam/Sites/floamshnu/web/__init__.py", line 14, in > <module> > import utils, db, net, wsgi, http, webapi, request, httpserver, > debugerror > File "/Users/floam/Sites/floamshnu/web/debugerror.py", line 235, in > <module> > dicttable_r = Template(dicttable_t, filter=websafe) > TypeError: '_faketemplate' object is not callable > > I could probably start by hacking up the web.py code to not call > debugerror, but before I go any deeper: > > a) Did I do something wrong? > b) Is TTWain even supposed to be working as a drop-in replacement in > this situation? If not, how can I use it? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
