From fbaf358a8c297202b8c0926d6a3f383298b8e3e2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 5 Apr 2018 23:19:16 +0300 Subject: [PATCH] Feat(web): Search authors --- m_librarian/web/app.py | 50 ++++- m_librarian/web/views/index.py | 21 +- m_librarian/web/views/index.tmpl | 10 +- m_librarian/web/views/layout.py | 27 ++- m_librarian/web/views/layout.tmpl | 13 +- m_librarian/web/views/list_authors.py | 184 ++++++++++++++++++ m_librarian/web/views/list_authors.tmpl | 18 ++ m_librarian/web/views/search_authors.py | 173 ++++++++++++++++ m_librarian/web/views/search_authors.tmpl | 9 + m_librarian/web/views/search_authors_form.py | 148 ++++++++++++++ .../web/views/search_authors_form.tmpl | 16 ++ 11 files changed, 641 insertions(+), 28 deletions(-) create mode 100644 m_librarian/web/views/list_authors.py create mode 100644 m_librarian/web/views/list_authors.tmpl create mode 100644 m_librarian/web/views/search_authors.py create mode 100644 m_librarian/web/views/search_authors.tmpl create mode 100644 m_librarian/web/views/search_authors_form.py create mode 100644 m_librarian/web/views/search_authors_form.tmpl diff --git a/m_librarian/web/app.py b/m_librarian/web/app.py index 3a95c8b..e4677d3 100644 --- a/m_librarian/web/app.py +++ b/m_librarian/web/app.py @@ -1,7 +1,55 @@ -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)} diff --git a/m_librarian/web/views/index.py b/m_librarian/web/views/index.py index 9456a5e..1e4c4df 100644 --- a/m_librarian/web/views/index.py +++ b/m_librarian/web/views/index.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- @@ -25,6 +26,7 @@ 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 @@ -34,10 +36,10 @@ VFN=valueForName 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: @@ -70,7 +72,7 @@ class index(layout): - ## 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 @@ -85,11 +87,12 @@ class index(layout): ######################################## ## START - generated method body - write(u'''

Index

+ write(u'''

\u041f\u043e\u0438\u0441\u043a \u0430\u0432\u0442\u043e\u0440\u043e\u0432

-

Hello, World!

- -

Quit

+''') + _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''' ''') ######################################## @@ -141,7 +144,7 @@ class index(layout): _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ - title = 'Index' + title = 'Поиск' _mainCheetahMethod_for_index = 'writeBody' diff --git a/m_librarian/web/views/index.tmpl b/m_librarian/web/views/index.tmpl index 9832186..57c6b74 100644 --- a/m_librarian/web/views/index.tmpl +++ b/m_librarian/web/views/index.tmpl @@ -1,9 +1,9 @@ +#encoding utf-8 #extends views.layout -#attr $title = 'Index' +#attr $title = 'Поиск' #def body -

Index

+

Поиск авторов

-

Hello, World!

- -

Quit

+#from views.search_authors_form import search_authors_form +$search_authors_form() #end def diff --git a/m_librarian/web/views/layout.py b/m_librarian/web/views/layout.py index f8ba1b2..726e570 100644 --- a/m_librarian/web/views/layout.py +++ b/m_librarian/web/views/layout.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- @@ -33,10 +34,10 @@ VFN=valueForName 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: @@ -88,22 +89,28 @@ class layout(Template): - + ''') - _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''' + _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 - + + + + + +

m_Librarian

\u0412\u044b\u0445\u043e\u0434
''') - _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''' diff --git a/m_librarian/web/views/layout.tmpl b/m_librarian/web/views/layout.tmpl index 60da30e..778cafb 100644 --- a/m_librarian/web/views/layout.tmpl +++ b/m_librarian/web/views/layout.tmpl @@ -1,19 +1,26 @@ +#encoding utf-8 #attr $title = '' - -$title + +$title — m_Librarian - + + + + + +

m_Librarian

Выход
$body diff --git a/m_librarian/web/views/list_authors.py b/m_librarian/web/views/list_authors.py new file mode 100644 index 0000000..f38c9c4 --- /dev/null +++ b/m_librarian/web/views/list_authors.py @@ -0,0 +1,184 @@ +#!/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'''

''') + _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'''

+ +''') + if VFFSL(SL,"authors",True): # generated from line 7, col 1 + write(u''' +''') + for author in VFFSL(SL,"authors",True): # generated from line 9, col 3 + write(u''' + + +''') + write(u'''
''') + _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'''
+''') + else: # generated from line 15, col 1 + write(u'''

\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0430!

+''') + + ######################################## + ## 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() + + diff --git a/m_librarian/web/views/list_authors.tmpl b/m_librarian/web/views/list_authors.tmpl new file mode 100644 index 0000000..b0b20ad --- /dev/null +++ b/m_librarian/web/views/list_authors.tmpl @@ -0,0 +1,18 @@ +#encoding utf-8 +#extends views.layout +#attr $title = 'Список авторов' +#def body +

$title

+ +#if $authors + + #for $author in $authors + + + + #end for +
$author.fullname
+#else +

Не найдено ни одного автора!

+#end if +#end def diff --git a/m_librarian/web/views/search_authors.py b/m_librarian/web/views/search_authors.py new file mode 100644 index 0000000..fdc4a4b --- /dev/null +++ b/m_librarian/web/views/search_authors.py @@ -0,0 +1,173 @@ +#!/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'''

''') + _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'''

+ +''') + _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() + + diff --git a/m_librarian/web/views/search_authors.tmpl b/m_librarian/web/views/search_authors.tmpl new file mode 100644 index 0000000..b659f38 --- /dev/null +++ b/m_librarian/web/views/search_authors.tmpl @@ -0,0 +1,9 @@ +#encoding utf-8 +#extends views.layout +#attr $title = 'Поиск авторов' +#def body +

$title

+ +#from views.search_authors_form import search_authors_form +$search_authors_form() +#end def diff --git a/m_librarian/web/views/search_authors_form.py b/m_librarian/web/views/search_authors_form.py new file mode 100644 index 0000000..1e30443 --- /dev/null +++ b/m_librarian/web/views/search_authors_form.py @@ -0,0 +1,148 @@ +#!/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'''
+ +
+ + \u041f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 + + \u041f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0430 + + \u0422\u043e\u0447\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 +
+ + \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 +
+ +
+''') + + ######################################## + ## 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() + + diff --git a/m_librarian/web/views/search_authors_form.tmpl b/m_librarian/web/views/search_authors_form.tmpl new file mode 100644 index 0000000..ec73155 --- /dev/null +++ b/m_librarian/web/views/search_authors_form.tmpl @@ -0,0 +1,16 @@ +#encoding utf-8 +
+ +
+ + Подстрока в начале + + Подстрока + + Точное совпадение +
+ + Различать прописные/строчные +
+ +
-- 2.39.2