Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>This works</strong></p> <pre><code>try:web.render('mafbase.tmpl', None, True, 'mafbase') except:pass </code></pre> <p><strong>This is what i did with you code</strong></p> <pre><code>from cheetahimport import * sys.path.append('./templates') cheetah_import('mafbase') </code></pre> <h1>includes dont work in the given method.</h1> <p><strong>This is the error i got</strong></p> <pre><code> localhost pop]$ vi code.py [mark@localhost pop]$ ./code.py 9911 http://0.0.0.0:9911/ 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 "user.py", line 264, in proxyfunc return func(self, *args, **kw) File "/home/mark/work/pop/code.py", line 1801, in GET return web.render('subclass.html') File "/home/mark/work/common/web/cheetah.py", line 104, in render return str(compiled_tmpl) File "/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/Template.py", line 982, in __str__ def __str__(self): return getattr(self, mainMethName)() File "templates/mafbase.py", line 713, in respond self._handleCheetahInclude("widgetbox.html", trans=trans, includeFrom="file", raw=False) File "/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/Template.py", line 1512, in _handleCheetahInclude nestedTemplateClass = compiler.compile(source=source,file=file) File "/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/Template.py", line 693, in compile fileHash = str(hash(file))+str(os.path.getmtime(file)) File "/usr/lib/python2.5/posixpath.py", line 143, in getmtime return os.stat(filename).st_mtime OSError: [Errno 2] No such file or directory: '/home/mark/work/pop/widgetbox.html' </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload