Home | Trees | Indices | Help |
---|
|
1 #!/usr/bin/env python 2 3 4 5 6 ################################################## 7 ## DEPENDENCIES 8 import sys 9 import os 10 import os.path 11 from os.path import getmtime, exists 12 import time 13 import types 14 import __builtin__ 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 23 24 ################################################## 25 ## MODULE CONSTANTS 26 try: 27 True, False 28 except NameError: 29 True, False = (1==1), (1==0) 30 VFFSL=valueFromFrameOrSearchList 31 VFSL=valueFromSearchList 32 VFN=valueForName 33 currentTime=time.time 34 __CHEETAH_version__ = '2.0.1' 35 __CHEETAH_versionTuple__ = (2, 0, 1, 'final', 0) 36 __CHEETAH_genTime__ = 1389100489.1644781 37 __CHEETAH_genTimestamp__ = 'Tue Jan 7 14:14:49 2014' 38 __CHEETAH_src__ = 'FileDataTmpl.tmpl' 39 __CHEETAH_srcLastModified__ = 'Tue Jan 7 14:06:55 2014' 40 __CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine' 41 42 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: 43 raise AssertionError( 44 'This template was compiled with Cheetah version' 45 ' %s. Templates compiled before version %s must be recompiled.'%( 46 __CHEETAH_version__, RequiredCheetahVersion)) 47 48 ################################################## 49 ## CLASSES 5052 53 ################################################## 54 ## CHEETAH GENERATED METHODS 55 56120 121 ## END CLASS DEFINITION 122 123 if not hasattr(FileDataTmpl, '_initCheetahAttributes'): 124 templateAPIClass = getattr(FileDataTmpl, '_CHEETAH_templateClass', Template) 125 templateAPIClass._addCheetahPlumbingCodeToClass(FileDataTmpl) 126 127 128 # CHEETAH was developed by Tavis Rudd and Mike Orr 129 # with code, advice and input from many other volunteers. 130 # For more information visit http://www.CheetahTemplate.org/ 131 132 ################################################## 133 ## if run from command line: 134 if __name__ == '__main__': 135 from Cheetah.TemplateCmdLineIface import CmdLineIface 136 CmdLineIface(templateObj=FileDataTmpl()).run() 13758 59 Template.__init__(self, *args, **KWs) 60 if not self._CHEETAH__instanceInitialized: 61 cheetahKWArgs = {} 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)66 6769 70 71 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 75 if not trans: 76 trans = DummyTransaction() 77 _dummyTrans = True 78 else: _dummyTrans = False 79 write = trans.response().write 80 SL = self._CHEETAH__searchList 81 _filter = self._CHEETAH__currentFilter 82 83 ######################################## 84 ## START - generated method body 85 86 write('''<!-- FileDataTmpl #encoding utf-8 --> 87 <a href="./''') 88 _v = VFFSL(SL,"data.filename",True) # '$data.filename' on line 2, col 12 89 if _v is not None: write(_filter(_v, rawExpr='$data.filename')) # from line 2, col 12. 90 write('''">''') 91 _v = VFFSL(SL,"data.filename",True) # '$data.filename' on line 2, col 28 92 if _v is not None: write(_filter(_v, rawExpr='$data.filename')) # from line 2, col 28. 93 write('''</a> 94 ''') 95 96 ######################################## 97 ## END - generated method body 98 99 return _dummyTrans and trans.response().getvalue() or ""100 101 ################################################## 102 ## CHEETAH GENERATED ATTRIBUTES 103 104 105 _CHEETAH__instanceInitialized = False 106 107 _CHEETAH_version = __CHEETAH_version__ 108 109 _CHEETAH_versionTuple = __CHEETAH_versionTuple__ 110 111 _CHEETAH_genTime = __CHEETAH_genTime__ 112 113 _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ 114 115 _CHEETAH_src = __CHEETAH_src__ 116 117 _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ 118 119 _mainCheetahMethod_for_FileDataTmpl= 'respond'
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Jan 23 17:05:22 2014 | http://epydoc.sourceforge.net |