-from bottle import route, cheetah_view
+from sqlobject.sqlbuilder import CONCAT
+from bottle import cheetah_view, redirect, request, route
+
+from m_librarian.db import Author, open_db
+from m_librarian.search import search_authors
@route('/')
@cheetah_view('index.tmpl')
def index():
return {}
+
+
+@route('/search_authors', method='GET')
+def _search_authors():
+ return redirect('/search_authors/')
+
+
+@route('/search_authors/', method='GET')
+@cheetah_view('search_authors.tmpl')
+def search_authors_get():
+ return {}
+
+
+def decode(value):
+ if isinstance(value, bytes):
+ return value.decode('utf-8')
+ return value
+
+
+def _guess_case_sensitivity(value):
+ return not value.islower()
+
+
+@route('/search_authors/', method='POST')
+@cheetah_view('list_authors.tmpl')
+def search_authors_post():
+ value = request.forms.get('search_authors')
+ if not value:
+ return redirect('/search_authors/')
+ value = decode(value)
+ search_type = request.forms.get('search_type')
+ if not search_type:
+ search_type = 'start'
+ case_sensitive = request.forms.get('case_sensitive')
+ if case_sensitive is None:
+ case_sensitive = _guess_case_sensitivity(value)
+ expressions = [(
+ CONCAT(Author.q.surname, ' ', Author.q.name, ' ', Author.q.misc_name),
+ decode(value)
+ )]
+ open_db()
+ authors = search_authors(search_type, case_sensitive, {}, expressions,
+ orderBy=('surname', 'name', 'misc_name'))
+ return {'authors': list(authors)}
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
import Cheetah.ErrorCatchers as ErrorCatchers
from Cheetah.compat import unicode
from views.layout import layout
+from views.search_authors_form import search_authors_form
##################################################
## MODULE CONSTANTS
currentTime=time.time
__CHEETAH_version__ = '3.1.0'
__CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
-__CHEETAH_genTime__ = 1522609706.987582
-__CHEETAH_genTimestamp__ = 'Sun Apr 1 22:08:26 2018'
+__CHEETAH_genTime__ = 1522958547.022135
+__CHEETAH_genTimestamp__ = 'Thu Apr 5 23:02:27 2018'
__CHEETAH_src__ = 'index.tmpl'
-__CHEETAH_srcLastModified__ = 'Sun Apr 1 22:08:25 2018'
+__CHEETAH_srcLastModified__ = 'Thu Apr 5 23:02:23 2018'
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
- ## CHEETAH: generated from #def body at line 3, col 1.
+ ## CHEETAH: generated from #def body at line 4, col 1.
trans = KWS.get("trans")
if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
trans = self.transaction # is None unless self.awake() was called
########################################
## START - generated method body
- write(u'''<h1>Index</h1>
+ write(u'''<h1>\u041f\u043e\u0438\u0441\u043a \u0430\u0432\u0442\u043e\u0440\u043e\u0432</h1>
-<p>Hello, World!</p>
-
-<p><a href="/quit">Quit</a></p>
+''')
+ _v = VFFSL(SL,"search_authors_form",False)() # u'$search_authors_form()' on line 8, col 1
+ if _v is not None: write(_filter(_v, rawExpr=u'$search_authors_form()')) # from line 8, col 1.
+ write(u'''
''')
########################################
_CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
- title = 'Index'
+ title = 'Поиск'
_mainCheetahMethod_for_index = 'writeBody'
+#encoding utf-8
#extends views.layout
-#attr $title = 'Index'
+#attr $title = 'Поиск'
#def body
-<h1>Index</h1>
+<h1>Поиск авторов</h1>
-<p>Hello, World!</p>
-
-<p><a href="/quit">Quit</a></p>
+#from views.search_authors_form import search_authors_form
+$search_authors_form()
#end def
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
currentTime=time.time
__CHEETAH_version__ = '3.1.0'
__CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
-__CHEETAH_genTime__ = 1522609587.049776
-__CHEETAH_genTimestamp__ = 'Sun Apr 1 22:06:27 2018'
+__CHEETAH_genTime__ = 1522953148.995817
+__CHEETAH_genTimestamp__ = 'Thu Apr 5 21:32:28 2018'
__CHEETAH_src__ = 'layout.tmpl'
-__CHEETAH_srcLastModified__ = 'Sun Apr 1 22:06:06 2018'
+__CHEETAH_srcLastModified__ = 'Thu Apr 5 21:32:27 2018'
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
<html>
<!-- THIS PAGE IS AUTOMATICALLY GENERATED USING CheetahTemplate. DO NOT EDIT. -->
<head>
-<meta HTTP-Equiv="Content-Type" content="text/html">
+<meta HTTP-Equiv="Content-Type" content="text/html; charset=utf-8">
<title>''')
- _v = VFFSL(SL,"title",True) # u'$title' on line 8, col 8
- if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 8, col 8.
- write(u'''</title>
+ _v = VFFSL(SL,"title",True) # u'$title' on line 9, col 8
+ if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 9, col 8.
+ write(u''' \u2014 m_Librarian</title>
<meta name="author" content="Oleg Broytman">
<meta name="copyright" content="© 2018 PhiloSoft Design">
<link rev="made" href="mailto:phd@phdru.name">
<meta name="generator" content="CheetahTemplate">
<meta name="MSSmartTagsPreventParsing" content="TRUE"> <!-- MUST DIE -->
</head>
-<body bgcolor="#CCCCCC" text="#000000"
+<body bgcolor="#FFFFFF" text="#000000"
link="#0000bb" vlink="#551a8b" alink="#ff0000">
+<table style="width: 100%">
+<tr style="width: 100%">
+ <td style="width: 50%"><p>m_Librarian</p></td>
+ <td style="width: 50%; text-align: right"><a href="/quit">\u0412\u044b\u0445\u043e\u0434</a></td>
+</tr>
+</table>
''')
- _v = VFFSL(SL,"body",True) # u'$body' on line 17, col 1
- if _v is not None: write(_filter(_v, rawExpr=u'$body')) # from line 17, col 1.
+ _v = VFFSL(SL,"body",True) # u'$body' on line 24, col 1
+ if _v is not None: write(_filter(_v, rawExpr=u'$body')) # from line 24, col 1.
write(u'''
</body>
</html>
+#encoding utf-8
#attr $title = ''
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- THIS PAGE IS AUTOMATICALLY GENERATED USING CheetahTemplate. DO NOT EDIT. -->
<head>
-<meta HTTP-Equiv="Content-Type" content="text/html">
-<title>$title</title>
+<meta HTTP-Equiv="Content-Type" content="text/html; charset=utf-8">
+<title>$title — m_Librarian</title>
<meta name="author" content="Oleg Broytman">
<meta name="copyright" content="© 2018 PhiloSoft Design">
<link rev="made" href="mailto:phd@phdru.name">
<meta name="generator" content="CheetahTemplate">
<meta name="MSSmartTagsPreventParsing" content="TRUE"> <!-- MUST DIE -->
</head>
-<body bgcolor="#CCCCCC" text="#000000"
+<body bgcolor="#FFFFFF" text="#000000"
link="#0000bb" vlink="#551a8b" alink="#ff0000">
+<table style="width: 100%">
+<tr style="width: 100%">
+ <td style="width: 50%"><p>m_Librarian</p></td>
+ <td style="width: 50%; text-align: right"><a href="/quit">Выход</a></td>
+</tr>
+</table>
$body
</body>
</html>
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+
+
+
+##################################################
+## DEPENDENCIES
+import sys
+import os
+import os.path
+try:
+ import builtins as builtin
+except ImportError:
+ import __builtin__ as builtin
+from os.path import getmtime, exists
+import time
+import types
+from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
+from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
+from Cheetah.Template import Template
+from Cheetah.DummyTransaction import *
+from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
+from Cheetah.CacheRegion import CacheRegion
+import Cheetah.Filters as Filters
+import Cheetah.ErrorCatchers as ErrorCatchers
+from Cheetah.compat import unicode
+from views.layout import layout
+
+##################################################
+## MODULE CONSTANTS
+VFFSL=valueFromFrameOrSearchList
+VFSL=valueFromSearchList
+VFN=valueForName
+currentTime=time.time
+__CHEETAH_version__ = '3.1.0'
+__CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
+__CHEETAH_genTime__ = 1522957487.491209
+__CHEETAH_genTimestamp__ = 'Thu Apr 5 22:44:47 2018'
+__CHEETAH_src__ = 'list_authors.tmpl'
+__CHEETAH_srcLastModified__ = 'Thu Apr 5 22:42:57 2018'
+__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
+
+if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
+ raise AssertionError(
+ 'This template was compiled with Cheetah version'
+ ' %s. Templates compiled before version %s must be recompiled.'%(
+ __CHEETAH_version__, RequiredCheetahVersion))
+
+##################################################
+## CLASSES
+
+class list_authors(layout):
+
+ ##################################################
+ ## CHEETAH GENERATED METHODS
+
+
+ def __init__(self, *args, **KWs):
+
+ super(list_authors, self).__init__(*args, **KWs)
+ if not self._CHEETAH__instanceInitialized:
+ cheetahKWArgs = {}
+ allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
+ for k,v in KWs.items():
+ if k in allowedKWs: cheetahKWArgs[k] = v
+ self._initCheetahInstance(**cheetahKWArgs)
+
+
+ def body(self, **KWS):
+
+
+
+ ## CHEETAH: generated from #def body at line 4, col 1.
+ trans = KWS.get("trans")
+ if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
+ trans = self.transaction # is None unless self.awake() was called
+ if not trans:
+ trans = DummyTransaction()
+ _dummyTrans = True
+ else: _dummyTrans = False
+ write = trans.response().write
+ SL = self._CHEETAH__searchList
+ _filter = self._CHEETAH__currentFilter
+
+ ########################################
+ ## START - generated method body
+
+ write(u'''<h1>''')
+ _v = VFFSL(SL,"title",True) # u'$title' on line 5, col 5
+ if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 5, col 5.
+ write(u'''</h1>
+
+''')
+ if VFFSL(SL,"authors",True): # generated from line 7, col 1
+ write(u''' <table>
+''')
+ for author in VFFSL(SL,"authors",True): # generated from line 9, col 3
+ write(u''' <tr>
+ <td>''')
+ _v = VFFSL(SL,"author.fullname",True) # u'$author.fullname' on line 11, col 9
+ if _v is not None: write(_filter(_v, rawExpr=u'$author.fullname')) # from line 11, col 9.
+ write(u'''</td>
+ </tr>
+''')
+ write(u''' </table>
+''')
+ else: # generated from line 15, col 1
+ 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>
+''')
+
+ ########################################
+ ## END - generated method body
+
+ return _dummyTrans and trans.response().getvalue() or ""
+
+
+ def writeBody(self, **KWS):
+
+
+
+ ## CHEETAH: main method generated for this template
+ trans = KWS.get("trans")
+ if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
+ trans = self.transaction # is None unless self.awake() was called
+ if not trans:
+ trans = DummyTransaction()
+ _dummyTrans = True
+ else: _dummyTrans = False
+ write = trans.response().write
+ SL = self._CHEETAH__searchList
+ _filter = self._CHEETAH__currentFilter
+
+ ########################################
+ ## START - generated method body
+
+
+ ########################################
+ ## END - generated method body
+
+ return _dummyTrans and trans.response().getvalue() or ""
+
+ ##################################################
+ ## CHEETAH GENERATED ATTRIBUTES
+
+
+ _CHEETAH__instanceInitialized = False
+
+ _CHEETAH_version = __CHEETAH_version__
+
+ _CHEETAH_versionTuple = __CHEETAH_versionTuple__
+
+ _CHEETAH_genTime = __CHEETAH_genTime__
+
+ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
+
+ _CHEETAH_src = __CHEETAH_src__
+
+ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
+
+ title = 'Список авторов'
+
+ _mainCheetahMethod_for_list_authors = 'writeBody'
+
+## END CLASS DEFINITION
+
+if not hasattr(list_authors, '_initCheetahAttributes'):
+ templateAPIClass = getattr(list_authors,
+ '_CHEETAH_templateClass',
+ Template)
+ templateAPIClass._addCheetahPlumbingCodeToClass(list_authors)
+
+
+# CHEETAH was developed by Tavis Rudd and Mike Orr
+# with code, advice and input from many other volunteers.
+# For more information visit http://cheetahtemplate.org/
+
+##################################################
+## if run from command line:
+if __name__ == '__main__':
+ from Cheetah.TemplateCmdLineIface import CmdLineIface
+ CmdLineIface(templateObj=list_authors()).run()
+
+
--- /dev/null
+#encoding utf-8
+#extends views.layout
+#attr $title = 'Список авторов'
+#def body
+<h1>$title</h1>
+
+#if $authors
+ <table>
+ #for $author in $authors
+ <tr>
+ <td>$author.fullname</td>
+ </tr>
+ #end for
+ </table>
+#else
+ <p>Не найдено ни одного автора!</p>
+#end if
+#end def
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+
+
+
+##################################################
+## DEPENDENCIES
+import sys
+import os
+import os.path
+try:
+ import builtins as builtin
+except ImportError:
+ import __builtin__ as builtin
+from os.path import getmtime, exists
+import time
+import types
+from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
+from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
+from Cheetah.Template import Template
+from Cheetah.DummyTransaction import *
+from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
+from Cheetah.CacheRegion import CacheRegion
+import Cheetah.Filters as Filters
+import Cheetah.ErrorCatchers as ErrorCatchers
+from Cheetah.compat import unicode
+from views.layout import layout
+from views.search_authors_form import search_authors_form
+
+##################################################
+## MODULE CONSTANTS
+VFFSL=valueFromFrameOrSearchList
+VFSL=valueFromSearchList
+VFN=valueForName
+currentTime=time.time
+__CHEETAH_version__ = '3.1.0'
+__CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
+__CHEETAH_genTime__ = 1522952816.408144
+__CHEETAH_genTimestamp__ = 'Thu Apr 5 21:26:56 2018'
+__CHEETAH_src__ = 'search_authors.tmpl'
+__CHEETAH_srcLastModified__ = 'Thu Apr 5 21:26:43 2018'
+__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
+
+if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
+ raise AssertionError(
+ 'This template was compiled with Cheetah version'
+ ' %s. Templates compiled before version %s must be recompiled.'%(
+ __CHEETAH_version__, RequiredCheetahVersion))
+
+##################################################
+## CLASSES
+
+class search_authors(layout):
+
+ ##################################################
+ ## CHEETAH GENERATED METHODS
+
+
+ def __init__(self, *args, **KWs):
+
+ super(search_authors, self).__init__(*args, **KWs)
+ if not self._CHEETAH__instanceInitialized:
+ cheetahKWArgs = {}
+ allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
+ for k,v in KWs.items():
+ if k in allowedKWs: cheetahKWArgs[k] = v
+ self._initCheetahInstance(**cheetahKWArgs)
+
+
+ def body(self, **KWS):
+
+
+
+ ## CHEETAH: generated from #def body at line 4, col 1.
+ trans = KWS.get("trans")
+ if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
+ trans = self.transaction # is None unless self.awake() was called
+ if not trans:
+ trans = DummyTransaction()
+ _dummyTrans = True
+ else: _dummyTrans = False
+ write = trans.response().write
+ SL = self._CHEETAH__searchList
+ _filter = self._CHEETAH__currentFilter
+
+ ########################################
+ ## START - generated method body
+
+ write(u'''<h1>''')
+ _v = VFFSL(SL,"title",True) # u'$title' on line 5, col 5
+ if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 5, col 5.
+ write(u'''</h1>
+
+''')
+ _v = VFFSL(SL,"search_authors_form",False)() # u'$search_authors_form()' on line 8, col 1
+ if _v is not None: write(_filter(_v, rawExpr=u'$search_authors_form()')) # from line 8, col 1.
+ write(u'''
+''')
+
+ ########################################
+ ## END - generated method body
+
+ return _dummyTrans and trans.response().getvalue() or ""
+
+
+ def writeBody(self, **KWS):
+
+
+
+ ## CHEETAH: main method generated for this template
+ trans = KWS.get("trans")
+ if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
+ trans = self.transaction # is None unless self.awake() was called
+ if not trans:
+ trans = DummyTransaction()
+ _dummyTrans = True
+ else: _dummyTrans = False
+ write = trans.response().write
+ SL = self._CHEETAH__searchList
+ _filter = self._CHEETAH__currentFilter
+
+ ########################################
+ ## START - generated method body
+
+
+ ########################################
+ ## END - generated method body
+
+ return _dummyTrans and trans.response().getvalue() or ""
+
+ ##################################################
+ ## CHEETAH GENERATED ATTRIBUTES
+
+
+ _CHEETAH__instanceInitialized = False
+
+ _CHEETAH_version = __CHEETAH_version__
+
+ _CHEETAH_versionTuple = __CHEETAH_versionTuple__
+
+ _CHEETAH_genTime = __CHEETAH_genTime__
+
+ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
+
+ _CHEETAH_src = __CHEETAH_src__
+
+ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
+
+ title = 'Поиск авторов'
+
+ _mainCheetahMethod_for_search_authors = 'writeBody'
+
+## END CLASS DEFINITION
+
+if not hasattr(search_authors, '_initCheetahAttributes'):
+ templateAPIClass = getattr(search_authors,
+ '_CHEETAH_templateClass',
+ Template)
+ templateAPIClass._addCheetahPlumbingCodeToClass(search_authors)
+
+
+# CHEETAH was developed by Tavis Rudd and Mike Orr
+# with code, advice and input from many other volunteers.
+# For more information visit http://cheetahtemplate.org/
+
+##################################################
+## if run from command line:
+if __name__ == '__main__':
+ from Cheetah.TemplateCmdLineIface import CmdLineIface
+ CmdLineIface(templateObj=search_authors()).run()
+
+
--- /dev/null
+#encoding utf-8
+#extends views.layout
+#attr $title = 'Поиск авторов'
+#def body
+<h1>$title</h1>
+
+#from views.search_authors_form import search_authors_form
+$search_authors_form()
+#end def
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+
+
+
+##################################################
+## DEPENDENCIES
+import sys
+import os
+import os.path
+try:
+ import builtins as builtin
+except ImportError:
+ import __builtin__ as builtin
+from os.path import getmtime, exists
+import time
+import types
+from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
+from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
+from Cheetah.Template import Template
+from Cheetah.DummyTransaction import *
+from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
+from Cheetah.CacheRegion import CacheRegion
+import Cheetah.Filters as Filters
+import Cheetah.ErrorCatchers as ErrorCatchers
+from Cheetah.compat import unicode
+
+##################################################
+## MODULE CONSTANTS
+VFFSL=valueFromFrameOrSearchList
+VFSL=valueFromSearchList
+VFN=valueForName
+currentTime=time.time
+__CHEETAH_version__ = '3.1.0'
+__CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
+__CHEETAH_genTime__ = 1522958937.217914
+__CHEETAH_genTimestamp__ = 'Thu Apr 5 23:08:57 2018'
+__CHEETAH_src__ = 'search_authors_form.tmpl'
+__CHEETAH_srcLastModified__ = 'Thu Apr 5 23:08:55 2018'
+__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
+
+if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
+ raise AssertionError(
+ 'This template was compiled with Cheetah version'
+ ' %s. Templates compiled before version %s must be recompiled.'%(
+ __CHEETAH_version__, RequiredCheetahVersion))
+
+##################################################
+## CLASSES
+
+class search_authors_form(Template):
+
+ ##################################################
+ ## CHEETAH GENERATED METHODS
+
+
+ def __init__(self, *args, **KWs):
+
+ super(search_authors_form, self).__init__(*args, **KWs)
+ if not self._CHEETAH__instanceInitialized:
+ cheetahKWArgs = {}
+ allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
+ for k,v in KWs.items():
+ if k in allowedKWs: cheetahKWArgs[k] = v
+ self._initCheetahInstance(**cheetahKWArgs)
+
+
+ def respond(self, trans=None):
+
+
+
+ ## CHEETAH: main method generated for this template
+ if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
+ trans = self.transaction # is None unless self.awake() was called
+ if not trans:
+ trans = DummyTransaction()
+ _dummyTrans = True
+ else: _dummyTrans = False
+ write = trans.response().write
+ SL = self._CHEETAH__searchList
+ _filter = self._CHEETAH__currentFilter
+
+ ########################################
+ ## START - generated method body
+
+ write(u'''<form action="/search_authors/" method="POST">
+ <input name="search_authors" type="text" style="width: 80%">
+ <br>
+ <input name="search_type" value="start" type="radio">
+ \u041f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435
+ <input name="search_type" value="substring" type="radio">
+ \u041f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430
+ <input name="search_type" value="full" type="radio">
+ \u0422\u043e\u0447\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435
+ <br>
+ <input name="case_sensitive" type="checkbox">
+ \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
+ <br>
+ <input name="submit" type="submit">
+</form>
+''')
+
+ ########################################
+ ## END - generated method body
+
+ return _dummyTrans and trans.response().getvalue() or ""
+
+ ##################################################
+ ## CHEETAH GENERATED ATTRIBUTES
+
+
+ _CHEETAH__instanceInitialized = False
+
+ _CHEETAH_version = __CHEETAH_version__
+
+ _CHEETAH_versionTuple = __CHEETAH_versionTuple__
+
+ _CHEETAH_genTime = __CHEETAH_genTime__
+
+ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
+
+ _CHEETAH_src = __CHEETAH_src__
+
+ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
+
+ _mainCheetahMethod_for_search_authors_form = 'respond'
+
+## END CLASS DEFINITION
+
+if not hasattr(search_authors_form, '_initCheetahAttributes'):
+ templateAPIClass = getattr(search_authors_form,
+ '_CHEETAH_templateClass',
+ Template)
+ templateAPIClass._addCheetahPlumbingCodeToClass(search_authors_form)
+
+
+# CHEETAH was developed by Tavis Rudd and Mike Orr
+# with code, advice and input from many other volunteers.
+# For more information visit http://cheetahtemplate.org/
+
+##################################################
+## if run from command line:
+if __name__ == '__main__':
+ from Cheetah.TemplateCmdLineIface import CmdLineIface
+ CmdLineIface(templateObj=search_authors_form()).run()
+
+
--- /dev/null
+#encoding utf-8
+<form action="/search_authors/" method="POST">
+ <input name="search_authors" type="text" style="width: 80%">
+ <br>
+ <input name="search_type" value="start" type="radio">
+ Подстрока в начале
+ <input name="search_type" value="substring" type="radio">
+ Подстрока
+ <input name="search_type" value="full" type="radio">
+ Точное совпадение
+ <br>
+ <input name="case_sensitive" type="checkbox">
+ Различать прописные/строчные
+ <br>
+ <input name="submit" type="submit">
+</form>