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
29 ##################################################
31 VFFSL=valueFromFrameOrSearchList
32 VFSL=valueFromSearchList
35 __CHEETAH_version__ = '3.1.0'
36 __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
37 __CHEETAH_genTime__ = 1522958937.217914
38 __CHEETAH_genTimestamp__ = 'Thu Apr 5 23:08:57 2018'
39 __CHEETAH_src__ = 'search_authors_form.tmpl'
40 __CHEETAH_srcLastModified__ = 'Thu Apr 5 23:08:55 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 ##################################################
52 class search_authors_form(Template):
54 ##################################################
55 ## CHEETAH GENERATED METHODS
58 def __init__(self, *args, **KWs):
60 super(search_authors_form, 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 respond(self, trans=None):
73 ## CHEETAH: main method generated for this template
74 if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
75 trans = self.transaction # is None unless self.awake() was called
77 trans = DummyTransaction()
79 else: _dummyTrans = False
80 write = trans.response().write
81 SL = self._CHEETAH__searchList
82 _filter = self._CHEETAH__currentFilter
84 ########################################
85 ## START - generated method body
87 write(u'''<form action="/search_authors/" method="POST">
88 <input name="search_authors" type="text" style="width: 80%">
90 <input name="search_type" value="start" type="radio">
91 \u041f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435
92 <input name="search_type" value="substring" type="radio">
93 \u041f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430
94 <input name="search_type" value="full" type="radio">
95 \u0422\u043e\u0447\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435
97 <input name="case_sensitive" type="checkbox">
98 \u0420\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0435/\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435
100 <input name="submit" type="submit">
104 ########################################
105 ## END - generated method body
107 return _dummyTrans and trans.response().getvalue() or ""
109 ##################################################
110 ## CHEETAH GENERATED ATTRIBUTES
113 _CHEETAH__instanceInitialized = False
115 _CHEETAH_version = __CHEETAH_version__
117 _CHEETAH_versionTuple = __CHEETAH_versionTuple__
119 _CHEETAH_genTime = __CHEETAH_genTime__
121 _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
123 _CHEETAH_src = __CHEETAH_src__
125 _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
127 _mainCheetahMethod_for_search_authors_form = 'respond'
129 ## END CLASS DEFINITION
131 if not hasattr(search_authors_form, '_initCheetahAttributes'):
132 templateAPIClass = getattr(search_authors_form,
133 '_CHEETAH_templateClass',
135 templateAPIClass._addCheetahPlumbingCodeToClass(search_authors_form)
138 # CHEETAH was developed by Tavis Rudd and Mike Orr
139 # with code, advice and input from many other volunteers.
140 # For more information visit http://cheetahtemplate.org/
142 ##################################################
143 ## if run from command line:
144 if __name__ == '__main__':
145 from Cheetah.TemplateCmdLineIface import CmdLineIface
146 CmdLineIface(templateObj=search_authors_form()).run()