![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archivecheetah templating: place holders needed in a template
From: <ajay.padala@gmail.com>
Date: Wed Apr 12 2006 - 19:31:52 CEST
Hi
I would like to be able to get the inputs that are needed into a
For example if we had a template:
=====================
I want to be able to initialise this template and call a method on it
Is there anything in cheetah which does this?
At present, I am sending a "fake" dictionary into the searchList to do
fake = Generic()
=========================================
class Generic(object):
# def __new__(cls, *args, **kwargs):
calledAtts = sets.Set()
def __init__(self, *args, **kwargs):
def __call__(self, *args, **kwargs):
def __repr__(self):
def __nonzero__(self):
def __getattr__(self, name):
__delattr__ = __getattr__
def __setattr__(self, name, value):
def __len__(self):
def __iter__(self):
def __getitem__(self, i):
def __setitem__(self, i, v):
def __contains__(self, itemName):
def has_key(self, *args, **kwargs):
__delitem__ = __getitem__
========================================
This just logs each access to the dictionary and stores the key under
But obviously this won't work if I have #if statements etc. I am hoping
Ajay
|