I'm working on a TG to implement a forum for a site that I maintain. I want to write the code so that it is independent of my main site (i.e. in a package of its own). To include it in my site, I want to have something like this in controllers.py:
class Root(controllers.RootController):
myforum = ForumController()'
def index(self):
...blah blah blah...
The problem I'm running in to is that I would like the templates in my
forum package to be able to see and use the master template from the
site that I'm importing the forum code in to.
I tried something like:
from kid import Template
master_template = Template(name="mysite.templates.master")
My idea was to pass this in to my forum constructor to use in the
forum's templates. Python bombs on the "<?python import sitetemplate ?>"
statement at the top of the standard master template that quickstart
makes...so that doesn't work.
So, is there a way to pass around references to templates between
packages? Thanks in advance!
Ben
signature.asc
Description: This is a digitally signed message part

