Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Edmund Lian <elian@in...> - 2003-01-14 16:22:59
On 01/14/2003 09:55:17 AM Aaron Held wrote:
>My idea is to create a master template w/ a function call in the content
> t = self.pagetemplate
> t.data = self.data
Interesting twist. Apart from losing the inheritance (which I think is a
very big deal), doesn't this mean that the template is nominally in
control, because it--in a sense--initiates the call to the servlet? I'm not
sure if this is good or bad. Right now, my thinking is that it is better to
have the servlet in control.
From: Aaron Held <aaron@MetroNY.com> - 2003-01-14 16:36:53
> Interesting twist. Apart from losing the inheritance (which I think is a
> very big deal), doesn't this mean that the template is nominally in
> control, because it--in a sense--initiates the call to the servlet? I'm not
> sure if this is good or bad. Right now, my thinking is that it is better to
> have the servlet in control.
I agree about inheritance , which is my main issue w/ this, but I needed
The servlet is in conrol. In sitepage.py's writeHTML I call the "main"
template. Cheetah templates are never called directly and I never run
cheetah-compile. In practice I load and compile the template in the
servlets _init_ and store it as a instance var.
I also do not pass locals() to the template, only the methods that the
template could call.