6 ##################################################
12 import builtins as builtin
14 import __builtin__ as builtin
15 from os.path import getmtime, exists
18 from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
19 from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
20 from Cheetah.Template import Template
21 from Cheetah.DummyTransaction import *
22 from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
23 from Cheetah.CacheRegion import CacheRegion
24 import Cheetah.Filters as Filters
25 import Cheetah.ErrorCatchers as ErrorCatchers
26 from Cheetah.compat import unicode
27 from views.layout import layout
29 ##################################################
31 VFFSL=valueFromFrameOrSearchList
32 VFSL=valueFromSearchList
35 __CHEETAH_version__ = '3.1.0'
36 __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
37 __CHEETAH_genTime__ = 1522609706.987582
38 __CHEETAH_genTimestamp__ = 'Sun Apr 1 22:08:26 2018'
39 __CHEETAH_src__ = 'index.tmpl'
40 __CHEETAH_srcLastModified__ = 'Sun Apr 1 22:08:25 2018'
41 __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
43 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
45 'This template was compiled with Cheetah version'
46 ' %s. Templates compiled before version %s must be recompiled.'%(
47 __CHEETAH_version__, RequiredCheetahVersion))
49 ##################################################
54 ##################################################
55 ## CHEETAH GENERATED METHODS
58 def __init__(self, *args, **KWs):
60 super(index, self).__init__(*args, **KWs)
61 if not self._CHEETAH__instanceInitialized:
63 allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
64 for k,v in KWs.items():
65 if k in allowedKWs: cheetahKWArgs[k] = v
66 self._initCheetahInstance(**cheetahKWArgs)
69 def body(self, **KWS):
73 ## CHEETAH: generated from #def body at line 3, col 1.
74 trans = KWS.get("trans")
75 if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
76 trans = self.transaction # is None unless self.awake() was called
78 trans = DummyTransaction()
80 else: _dummyTrans = False
81 write = trans.response().write
82 SL = self._CHEETAH__searchList
83 _filter = self._CHEETAH__currentFilter
85 ########################################
86 ## START - generated method body
88 write(u'''<h1>Index</h1>
92 <p><a href="/quit">Quit</a></p>
95 ########################################
96 ## END - generated method body
98 return _dummyTrans and trans.response().getvalue() or ""
101 def writeBody(self, **KWS):
105 ## CHEETAH: main method generated for this template
106 trans = KWS.get("trans")
107 if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
108 trans = self.transaction # is None unless self.awake() was called
110 trans = DummyTransaction()
112 else: _dummyTrans = False
113 write = trans.response().write
114 SL = self._CHEETAH__searchList
115 _filter = self._CHEETAH__currentFilter
117 ########################################
118 ## START - generated method body
121 ########################################
122 ## END - generated method body
124 return _dummyTrans and trans.response().getvalue() or ""
126 ##################################################
127 ## CHEETAH GENERATED ATTRIBUTES
130 _CHEETAH__instanceInitialized = False
132 _CHEETAH_version = __CHEETAH_version__
134 _CHEETAH_versionTuple = __CHEETAH_versionTuple__
136 _CHEETAH_genTime = __CHEETAH_genTime__
138 _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
140 _CHEETAH_src = __CHEETAH_src__
142 _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
146 _mainCheetahMethod_for_index = 'writeBody'
148 ## END CLASS DEFINITION
150 if not hasattr(index, '_initCheetahAttributes'):
151 templateAPIClass = getattr(index,
152 '_CHEETAH_templateClass',
154 templateAPIClass._addCheetahPlumbingCodeToClass(index)
157 # CHEETAH was developed by Tavis Rudd and Mike Orr
158 # with code, advice and input from many other volunteers.
159 # For more information visit http://cheetahtemplate.org/
161 ##################################################
162 ## if run from command line:
163 if __name__ == '__main__':
164 from Cheetah.TemplateCmdLineIface import CmdLineIface
165 CmdLineIface(templateObj=index()).run()