2 # -*- coding: utf-8 -*-
7 ##################################################
13 import builtins as builtin
15 import __builtin__ as builtin
16 from os.path import getmtime, exists
19 from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
20 from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
21 from Cheetah.Template import Template
22 from Cheetah.DummyTransaction import *
23 from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
24 from Cheetah.CacheRegion import CacheRegion
25 import Cheetah.Filters as Filters
26 import Cheetah.ErrorCatchers as ErrorCatchers
27 from Cheetah.compat import unicode
28 from views.layout import layout
29 from views.search_authors_form import search_authors_form
31 ##################################################
33 VFFSL=valueFromFrameOrSearchList
34 VFSL=valueFromSearchList
37 __CHEETAH_version__ = '3.1.0'
38 __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
39 __CHEETAH_genTime__ = 1522961824.042332
40 __CHEETAH_genTimestamp__ = 'Thu Apr 5 23:57:04 2018'
41 __CHEETAH_src__ = 'list_authors.tmpl'
42 __CHEETAH_srcLastModified__ = 'Thu Apr 5 23:54:11 2018'
43 __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
45 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
47 'This template was compiled with Cheetah version'
48 ' %s. Templates compiled before version %s must be recompiled.'%(
49 __CHEETAH_version__, RequiredCheetahVersion))
51 ##################################################
54 class list_authors(layout):
56 ##################################################
57 ## CHEETAH GENERATED METHODS
60 def __init__(self, *args, **KWs):
62 super(list_authors, self).__init__(*args, **KWs)
63 if not self._CHEETAH__instanceInitialized:
65 allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
66 for k,v in KWs.items():
67 if k in allowedKWs: cheetahKWArgs[k] = v
68 self._initCheetahInstance(**cheetahKWArgs)
71 def body(self, **KWS):
75 ## CHEETAH: generated from #def body at line 4, col 1.
76 trans = KWS.get("trans")
77 if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
78 trans = self.transaction # is None unless self.awake() was called
80 trans = DummyTransaction()
82 else: _dummyTrans = False
83 write = trans.response().write
84 SL = self._CHEETAH__searchList
85 _filter = self._CHEETAH__currentFilter
87 ########################################
88 ## START - generated method body
90 write(u'''<h1>\u041f\u043e\u0438\u0441\u043a \u0430\u0432\u0442\u043e\u0440\u043e\u0432</h1>
92 _v = VFFSL(SL,"search_authors_form",False)(searchList=VFFSL(SL,"searchList",True)) # u'$search_authors_form(searchList=$searchList)' on line 7, col 1
93 if _v is not None: write(_filter(_v, rawExpr=u'$search_authors_form(searchList=$searchList)')) # from line 7, col 1.
97 _v = VFFSL(SL,"title",True) # u'$title' on line 9, col 5
98 if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 9, col 5.
102 if VFFSL(SL,"authors",True): # generated from line 11, col 1
105 for author in VFFSL(SL,"authors",True): # generated from line 13, col 3
108 _v = VFFSL(SL,"author.fullname",True) # u'$author.fullname' on line 15, col 9
109 if _v is not None: write(_filter(_v, rawExpr=u'$author.fullname')) # from line 15, col 9.
115 else: # generated from line 19, col 1
116 write(u''' <p>\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0430!</p>
119 ########################################
120 ## END - generated method body
122 return _dummyTrans and trans.response().getvalue() or ""
125 def writeBody(self, **KWS):
129 ## CHEETAH: main method generated for this template
130 trans = KWS.get("trans")
131 if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
132 trans = self.transaction # is None unless self.awake() was called
134 trans = DummyTransaction()
136 else: _dummyTrans = False
137 write = trans.response().write
138 SL = self._CHEETAH__searchList
139 _filter = self._CHEETAH__currentFilter
141 ########################################
142 ## START - generated method body
145 ########################################
146 ## END - generated method body
148 return _dummyTrans and trans.response().getvalue() or ""
150 ##################################################
151 ## CHEETAH GENERATED ATTRIBUTES
154 _CHEETAH__instanceInitialized = False
156 _CHEETAH_version = __CHEETAH_version__
158 _CHEETAH_versionTuple = __CHEETAH_versionTuple__
160 _CHEETAH_genTime = __CHEETAH_genTime__
162 _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
164 _CHEETAH_src = __CHEETAH_src__
166 _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
168 title = 'Список авторов'
170 _mainCheetahMethod_for_list_authors = 'writeBody'
172 ## END CLASS DEFINITION
174 if not hasattr(list_authors, '_initCheetahAttributes'):
175 templateAPIClass = getattr(list_authors,
176 '_CHEETAH_templateClass',
178 templateAPIClass._addCheetahPlumbingCodeToClass(list_authors)
181 # CHEETAH was developed by Tavis Rudd and Mike Orr
182 # with code, advice and input from many other volunteers.
183 # For more information visit http://cheetahtemplate.org/
185 ##################################################
186 ## if run from command line:
187 if __name__ == '__main__':
188 from Cheetah.TemplateCmdLineIface import CmdLineIface
189 CmdLineIface(templateObj=list_authors()).run()