[Cheetahtemplate-discuss] problem using include and def
Brought to you by:
rtyler,
tavis_rudd
From: Israel S. <duk...@gm...> - 2007-10-10 20:03:53
|
Hello: I'm trying to use a defined method throught an include in a template, but it fails. Here's what I'm doing: ----- ***** file1: #include 'file2' $variable1 ***** file2: #def variable1 some text #end def TRACEBACK: [dukebody@tux cheetah]$ cheetah fill file1 Filling file1 -> file1.html Traceback (most recent call last): File "/usr/bin/cheetah", line 3, in <module> CheetahWrapper().main() File "/usr/lib/python2.5/site-packages/Cheetah/CheetahWrapper.py", line 1= 83, in main meth() File "/usr/lib/python2.5/site-packages/Cheetah/CheetahWrapper.py", line 2= 45, in fill self._compileOrFill() File "/usr/lib/python2.5/site-packages/Cheetah/CheetahWrapper.py", line 3= 47, in _compileOrFill self._compileOrFillBundle(b) File "/usr/lib/python2.5/site-packages/Cheetah/CheetahWrapper.py", line 5= 68, in _compileOrFillBundle output =3D str(tclass(searchList=3Dself.searchList)) File "/usr/lib/python2.5/site-packages/Cheetah/Template.py", line 994, in= __str__ def __str__(self): return getattr(self, mainMethName)() File "file1.py", line 87, in respond NameMapper.NotFound: cannot find 'variable1' ----- What am I doing wrong? Cheers, Israel Saeta P=E9rez. http://dukebody.blogsome.com Nothing so needs reforming as other people's habits. -- Mark Twain |