... You could write up some test cases if you have time. See src/Tests/SyntaxAndOutput.py in the tarball. Cheers, Tavis ... Using Tomcat but need to do more?...
3862
tavis@...
Oct 21, 2006 8:32 pm
possibly. It's also a bit weird the other way around. Let's try them both out and see what feels most natural. ... Using Tomcat but need to do more? Need to...
3863
leenoori
leenoori@...
Oct 22, 2006 2:33 pm
... Here is a diff against the current HEAD of the trunk in CVS. Not sure if these tests are acceptable as it's the first time I've written tests for Cheetah....
3864
Tavis Rudd
tavis@...
Oct 25, 2006 11:38 pm
Hello, I'm using cheetah to generate config file for a fair-sized distributed system: a handful of config files on each of a couple of dozen systems. Templates...
3865
Dirk van Oosterbosch,...
labs@...
Oct 26, 2006 5:08 pm
Hi All, I am planning a debugging strategy, and I'd just like to bounce an idea off you guys. I've structured my website system based upon the inheritance...
3866
Tavis Rudd
tavis@...
Oct 26, 2006 6:05 pm
Hi Mike, For case 1 you're best leaving the $ off. It's only needed when you're either looking for variables from the searchlist or using namemapper style...
3867
Mike Orr
sluggoster@...
Oct 26, 2006 6:42 pm
On 10/26/06, Dirk van Oosterbosch, IR labs <labs@...> wrote: [talking about subclass methods in #extends templates] ... The proposed #super directive...
3868
Mike Orr
sluggoster@...
Oct 26, 2006 9:07 pm
... Either of the first two is OK. We're now recommending the first to avoid unnecessary '$', but I'm personally undecided and switch back and forth. The...
3869
Mike Meyer
mwm-keyword-cheetah.c...
Oct 26, 2006 10:44 pm
... I think I may have left out an important part: #attr $instance_counter = [0] I.e. - instance_counter is an attribute of the class the template compiles to,...
3870
Mike Orr
sluggoster@...
Oct 27, 2006 12:05 am
... If you really want a template class attribute, it's: #set $self.__class__.instance_counter = 0 #set $self.__class__.instance_counter += 1 I almost put that...
3871
Stuart Clarke
sjclarke@...
Nov 3, 2006 6:44 pm
Thanks very much for the reply Tavis. I'm sorry I didn't notice it until now. Comments below... ... *** Hmmm... TG will have multiple threads, no doubt. But...
3872
Stuart Clarke
sjclarke@...
Nov 3, 2006 6:48 pm
One more thing... ... *** So if I have multiple instances TG running, will each of them create different (random) cacheRegionId39;s for a given chunk of...
3873
Dirk van Oosterbosch,...
labs@...
Nov 6, 2006 3:23 am
Hi, this post is a sort of follow up on the recent discussion '#super directive for blocks' [1] and a thread I started a few months ago [2]. Back then I...
3874
Mike Meyer
mwm-keyword-cheetah.c...
Nov 6, 2006 4:49 am
... This is wrong - it should be super(Bar, $self).doMethod. I'll get to why in a minute. ... Should be $super(Baz, $self).doMethod ... Calling doMethod on an...
3875
Mike Orr
sluggoster@...
Nov 6, 2006 5:57 am
... I let someone else answer this first since I figured they'd understand it better. Mike Myers is right about how to use super. The new #super directive...
3876
leenoori
leenoori@...
Nov 6, 2006 12:06 pm
... I think this thread shows exactly why the #super directive is so important. You shouldn't have to be a Python expert to use Cheetah. The #super directive...
3877
Mike Orr
sluggoster@...
Nov 6, 2006 4:14 pm
... To clarify, if I understood Tavis correctly, #super will be a shorthand for $super(MyClass, self).myMethodName With no args it'll pass through the same...
3878
Mike Meyer
mwm-keyword-cheetah.c...
Nov 6, 2006 4:37 pm
... This is a bad idea. The problem isn't #super, it's $super. The worst problem is that super is misnamed - it doesn't return the superclass. It returns the ...
3879
leenoori
leenoori@...
Nov 6, 2006 5:32 pm
... Sounds great. ... Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make...
3880
leenoori
leenoori@...
Nov 6, 2006 5:41 pm
... Python newbie question: What happens when you have three templates: A = base template, has two #blocks, "black" and "white" B = inherits from A, overrides...
3881
Mike Meyer
mwm-keyword-cheetah.c...
Nov 6, 2006 5:47 pm
... If you are talking about an instance of C (and not a subclass of C), then that's what happens. Problems start showing up when you have something that's an...
3882
Mike Orr
sluggoster@...
Nov 6, 2006 7:59 pm
... I thought 'ExtendedClass.myMethod(self, ...)' was the g*dawful crap we had gotten away from, but you've convinced me we're still stuck with it. Why...
3883
Mike Orr
sluggoster@...
Nov 6, 2006 8:22 pm
... #super doesn't exist yet so we'll have to speculate. But the attached progam shows that with either the traditional or the super() calling convention, the...
3884
Mike Meyer
mwm-keyword-cheetah.c...
Nov 6, 2006 9:49 pm
... This is part of why I'm not sure what Python has now is "right". ... Actually, it's a duck typing + inheritance problem. B&D languages (at least, the ones...
3885
Mike Meyer
mwm-keyword-cheetah.c...
Nov 6, 2006 10:21 pm
Aagh. Apologies. I hadn't quite finished this before it went out. On completing it, I decided that it wasn't really relevant to the list. If you'd really like...
3886
Brian Bird
Brian.Bird@...
Nov 7, 2006 4:01 pm
I've just noticed that filters are called more often than I expected in the Cheetah templates. My understanding was that a placeholder in a function call would...
3887
Dirk van Oosterbosch,...
labs@...
Nov 8, 2006 1:24 pm
Thank you all very much for explaining and the examples shown. I didn't expect this subject to cause so much discussion. I think Mike Meyer's statement on the...
3888
Dirk van Oosterbosch,...
labs@...
Nov 8, 2006 2:55 pm
I discovered a strange issue with #attr in a template, where I had to replace that with setting the attribute in a pure python class. This issue reveals itself...
3889
Brian Bird
Brian.Bird@...
Nov 8, 2006 9:18 pm
I could be completely wrong, but that sounds like a class variable is being used instead of an instance variable: The docs say "The #attr directive creates...
3890
Dirk van Oosterbosch,...
labs@...
Nov 8, 2006 9:39 pm
... Duh.. Thanks for pointing that out. I feel very silly now. ... Using Tomcat but need to do more? Need to support web services, security? Get stuff done...