Please change the key's name or use the compiler setting
"prioritizeSearchListOverSelf=True" to prevent the NameMapper from using
 the Template member in place of your searchList variable
 ***************

Traceback (most recent call last):
  File "/home/mark/work/common/web/application.py", line 241, in process
    return self.handle()
  File "/home/mark/work/common/web/application.py", line 232, in handle
    return self._delegate(fn, self.fvars, args)
  File "/home/mark/work/common/web/application.py", line 411, in _delegate
    return handle_class(cls)
  File "/home/mark/work/common/web/application.py", line 386, in
handle_class
    return tocall(*args)
  File "/home/mark/work/pop/code.py", line 1492, in GET
    return web.render('subclass.html')
  File "/home/mark/work/common/web/cheetah.py", line 96, in render
    compiled_tmpl = _compiletemplate(template, base=base, isString=isString)
  File "/home/mark/work/common/web/utils.py", line 338, in __call__
    self.cache[key] = self.func(*args, **keywords)
  File "/home/mark/work/common/web/cheetah.py", line 42, in
__compiletemplate
    tmpl_compiler.addImportedVarNames(execspace.keys())
  File "/usr/lib/python2.5/site-packages/Cheetah/Compiler.py", line 1709, in
addImportedVarNames
    if self._methodBodyChunks and raw_statement and not
settings.get('useLegacyImportMode'):
  File "/usr/lib/python2.5/site-packages/Cheetah/Compiler.py", line 1609, in
__getattr__
    raise AttributeError, name
AttributeError: _methodBodyChunks

This is the error i get

On Mon, May 18, 2009 at 12:51 PM, <[email protected]> wrote:

>  pre-loading certain
> certain templates when the application starts (like a site-wide
> template) necessary to do the cheetah "#extends" style inheritance. I
>
>
> Hi Benj. Mako Hill
> Can you show in an example how to preload the site wide base classes
> I m unable to do this and hence seriously limiting the Cheetah Template
> functionality
> On Fri, Mar 2, 2007 at 7:15 PM, Benj. Mako Hill <[email protected]> wrote:
>
>> Greetings,
>>
>> Thanks for web.py everyone.  I've only been playing with it for a few
>> days now so please forgive any ignorance on my part. I'm having a great
>> time and looking forward to working with it a bit in the next couple
>> months.
>>
>> I was noticing a problem with cheetah.  Please, check out the attached
>> patch and let know what you think about the problem/solution.
>>
>> The code I've removed in the patch was preventing pre-loading certain
>> certain templates when the application starts (like a site-wide
>> template) necessary to do the cheetah "#extends" style inheritance. It
>> does this because it tries to call the header template in a context
>> where there is no request yet.  Renaming the templates from "foo.html"
>> to "foo.tmpl" makes the problem go away -- even though nothing else has
>> changed.
>>
>> At the very least, we shouldn't be calling header in this way and at
>> this place.
>>
>> But I can't figure out why it's there at all. Files that end in "html"
>> might, or might not, be UTF-8 encoded and I can't see any problems at
>> all that result from this just being turned off.
>>
>> Let me know if I've missed something.
>>
>> Regards,
>> Mako
>>
>>
>> --
>> Benjamin Mako Hill
>> [email protected]
>> http://mako.cc/
>>
>> Creativity can be a social contribution, but only in so
>> far as society is free to use the results. --RMS
>>
>> >>
>>
>> --- /var/lib/python-support/python2.4/web/cheetah.py    2007-02-27
>> 22:22:25.000000000 -0500
>> +++ cheetah.py  2007-02-27 22:47:02.311913250 -0500
>> @@ -80,9 +80,6 @@
>>     if not isinstance(terms, tuple):
>>         terms = (terms,)
>>
>> -    if not isString and template.endswith('.html'):
>> -        header('Content-Type','text/html; charset=utf-8', unique=True)
>> -
>>     if loadhooks.has_key('reloader'):
>>         compiled_tmpl = __compiletemplate(template, base=base,
>> isString=isString)
>>     else:
>>
>>
>
>
> --
> Bidegg worlds best auction site
> http://bidegg.com
>



-- 
Bidegg worlds best auction site
http://bidegg.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to