6 ##################################################
11 from os.path import getmtime, exists
15 from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
16 from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
17 from Cheetah.Template import Template
18 from Cheetah.DummyTransaction import DummyTransaction
19 from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
20 from Cheetah.CacheRegion import CacheRegion
21 import Cheetah.Filters as Filters
22 import Cheetah.ErrorCatchers as ErrorCatchers
24 ##################################################
29 True, False = (1==1), (1==0)
30 VFFSL=valueFromFrameOrSearchList
31 VFSL=valueFromSearchList
34 __CHEETAH_version__ = '2.0rc8'
35 __CHEETAH_versionTuple__ = (2, 0, 0, 'candidate', 8)
36 __CHEETAH_genTime__ = 1191828896.641397
37 __CHEETAH_genTimestamp__ = 'Mon Oct 8 03:34:56 2007'
38 __CHEETAH_src__ = 'skeleton.tmpl'
39 __CHEETAH_srcLastModified__ = 'Mon Oct 8 03:34:52 2007'
40 __CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'
42 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
44 'This template was compiled with Cheetah version'
45 ' %s. Templates compiled before version %s must be recompiled.'%(
46 __CHEETAH_version__, RequiredCheetahVersion))
48 ##################################################
51 class skeleton(Template):
53 ##################################################
54 ## CHEETAH GENERATED METHODS
57 def __init__(self, *args, **KWs):
59 Template.__init__(self, *args, **KWs)
60 if not self._CHEETAH__instanceInitialized:
62 allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
63 for k,v in KWs.items():
64 if k in allowedKWs: cheetahKWArgs[k] = v
65 self._initCheetahInstance(**cheetahKWArgs)
68 def respond(self, trans=None):
72 ## CHEETAH: main method generated for this template
73 if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
74 trans = self.transaction # is None unless self.awake() was called
76 trans = DummyTransaction()
78 else: _dummyTrans = False
79 write = trans.response().write
80 SL = self._CHEETAH__searchList
81 _filter = self._CHEETAH__currentFilter
83 ########################################
84 ## START - generated method body
88 _v = VFFSL(SL,"title",True) # '$title' on line 2, col 14
89 if _v is not None: write(_filter(_v, rawExpr='$title')) # from line 2, col 14.
91 <link href="/static/favicon.ico" type="image/x-icon" rel="shortcut icon">
92 <style media="screen" type="text/css">
93 @import "static/css/all.css";
95 <script type="text/javascript">
98 \tif (helpWin != null){
99 \t\tif(!helpWin.closed)
100 \t\t\thelpWin.close();
104 function helppopup(name){
106 helpWin = window.open("help?simple=true&subject="+encodeURIComponent(name), "HMMTHelp",
107 "status, height = 300, width = 400");
108 if (window.focus){helpWin.focus();}
115 if not VFFSL(SL,"varExists",False)('simple') or not VFFSL(SL,"simple",True): # generated from line 26, col 1
116 write('''<p>[You are logged in as ''')
117 _v = VFFSL(SL,"user.username",True) # '$user.username' on line 27, col 26
118 if _v is not None: write(_filter(_v, rawExpr='$user.username')) # from line 27, col 26.
121 _v = VFFSL(SL,"body",True) # '$body' on line 29, col 1
122 if _v is not None: write(_filter(_v, rawExpr='$body')) # from line 29, col 1.
125 if not VFFSL(SL,"varExists",False)('simple') or not VFFSL(SL,"simple",True): # generated from line 30, col 1
127 Questions? Contact <a href="mailto:sipb-xen-dev@mit.edu">sipb-xen-dev@mit.edu</a>.
133 ########################################
134 ## END - generated method body
136 return _dummyTrans and trans.response().getvalue() or ""
138 ##################################################
139 ## CHEETAH GENERATED ATTRIBUTES
142 _CHEETAH__instanceInitialized = False
144 _CHEETAH_version = __CHEETAH_version__
146 _CHEETAH_versionTuple = __CHEETAH_versionTuple__
148 _CHEETAH_genTime = __CHEETAH_genTime__
150 _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
152 _CHEETAH_src = __CHEETAH_src__
154 _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
156 _mainCheetahMethod_for_skeleton= 'respond'
158 ## END CLASS DEFINITION
160 if not hasattr(skeleton, '_initCheetahAttributes'):
161 templateAPIClass = getattr(skeleton, '_CHEETAH_templateClass', Template)
162 templateAPIClass._addCheetahPlumbingCodeToClass(skeleton)
165 # CHEETAH was developed by Tavis Rudd and Mike Orr
166 # with code, advice and input from many other volunteers.
167 # For more information visit http://www.CheetahTemplate.org/
169 ##################################################
170 ## if run from command line:
171 if __name__ == '__main__':
172 from Cheetah.TemplateCmdLineIface import CmdLineIface
173 CmdLineIface(templateObj=skeleton()).run()