Loading opds_catalog/__pycache__/feeds.cpython-35.pyc +12 B (39.9 KiB) File changed.No diff preview for this file type. View original file View changed file opds_catalog/feeds.py +6 −6 Original line number Diff line number Diff line Loading @@ -771,13 +771,13 @@ class BooksFeed(AuthFeed): if self.lang_code: sql="""select %(length)s as l, upper(substring(title,1,%(length)s)) as id, count(*) as cnt from opds_catalog_book where lang_code=%(lang_code)s and upper(title) like '%(chars)s%%' where lang_code=%(lang_code)s and upper(title) like '%(chars)s%%%%' group by upper(substring(title,1,%(length)s)) order by id"""%{'length':length, 'lang_code':self.lang_code, 'chars':chars} else: sql="""select %(length)s as l, upper(substring(title,1,%(length)s)) as id, count(*) as cnt from opds_catalog_book where upper(title) like '%(chars)s%%' where upper(title) like '%(chars)s%%%%' group by upper(substring(title,1,%(length)s)) order by id"""%{'length':length,'chars':chars} Loading Loading @@ -830,13 +830,13 @@ class AuthorsFeed(AuthFeed): if self.lang_code: sql="""select %(length)s as l, upper(substring(last_name,1,%(length)s)) as id, count(*) as cnt from opds_catalog_author where lang_code=%(lang_code)s and upper(last_name) like '%(chars)s%%' where lang_code=%(lang_code)s and upper(last_name) like '%(chars)s%%%%' group by upper(substring(last_name,1,%(length)s)) order by id"""%{'length':length, 'lang_code':self.lang_code, 'chars':chars} else: sql="""select %(length)s as l, upper(substring(last_name,1,%(length)s)) as id, count(*) as cnt from opds_catalog_author where upper(last_name) like '%(chars)s%%' where upper(last_name) like '%(chars)s%%%%' group by upper(substring(last_name,1,%(length)s)) order by id"""%{'length':length,'chars':chars} Loading Loading @@ -889,13 +889,13 @@ class SeriesFeed(AuthFeed): if self.lang_code: sql="""select %(length)s as l, upper(substring(ser,1,%(length)s)) as id, count(*) as cnt from opds_catalog_series where lang_code=%(lang_code)s and upper(ser) like '%(chars)s%%' where lang_code=%(lang_code)s and upper(ser) like '%(chars)s%%%%' group by upper(substring(ser,1,%(length)s)) order by id"""%{'length':length, 'lang_code':self.lang_code, 'chars':chars} else: sql="""select %(length)s as l, upper(substring(ser,1,%(length)s)) as id, count(*) as cnt from opds_catalog_series where upper(ser) like '%(chars)s%%' where upper(ser) like '%(chars)s%%%%' group by upper(substring(ser,1,%(length)s)) order by id"""%{'length':length,'chars':chars} Loading sopds_web_backend/__pycache__/views.cpython-35.pyc −19 B (14.1 KiB) File changed.No diff preview for this file type. View original file View changed file sopds_web_backend/views.py +1 −2 Original line number Diff line number Diff line Loading @@ -398,7 +398,6 @@ def BooksView(request): group by upper(substring(title,1,%(length)s)) order by id"""%{'length':length,'chars':chars} print(sql) items = Book.objects.raw(sql) args['items']=items Loading Loading
opds_catalog/__pycache__/feeds.cpython-35.pyc +12 B (39.9 KiB) File changed.No diff preview for this file type. View original file View changed file
opds_catalog/feeds.py +6 −6 Original line number Diff line number Diff line Loading @@ -771,13 +771,13 @@ class BooksFeed(AuthFeed): if self.lang_code: sql="""select %(length)s as l, upper(substring(title,1,%(length)s)) as id, count(*) as cnt from opds_catalog_book where lang_code=%(lang_code)s and upper(title) like '%(chars)s%%' where lang_code=%(lang_code)s and upper(title) like '%(chars)s%%%%' group by upper(substring(title,1,%(length)s)) order by id"""%{'length':length, 'lang_code':self.lang_code, 'chars':chars} else: sql="""select %(length)s as l, upper(substring(title,1,%(length)s)) as id, count(*) as cnt from opds_catalog_book where upper(title) like '%(chars)s%%' where upper(title) like '%(chars)s%%%%' group by upper(substring(title,1,%(length)s)) order by id"""%{'length':length,'chars':chars} Loading Loading @@ -830,13 +830,13 @@ class AuthorsFeed(AuthFeed): if self.lang_code: sql="""select %(length)s as l, upper(substring(last_name,1,%(length)s)) as id, count(*) as cnt from opds_catalog_author where lang_code=%(lang_code)s and upper(last_name) like '%(chars)s%%' where lang_code=%(lang_code)s and upper(last_name) like '%(chars)s%%%%' group by upper(substring(last_name,1,%(length)s)) order by id"""%{'length':length, 'lang_code':self.lang_code, 'chars':chars} else: sql="""select %(length)s as l, upper(substring(last_name,1,%(length)s)) as id, count(*) as cnt from opds_catalog_author where upper(last_name) like '%(chars)s%%' where upper(last_name) like '%(chars)s%%%%' group by upper(substring(last_name,1,%(length)s)) order by id"""%{'length':length,'chars':chars} Loading Loading @@ -889,13 +889,13 @@ class SeriesFeed(AuthFeed): if self.lang_code: sql="""select %(length)s as l, upper(substring(ser,1,%(length)s)) as id, count(*) as cnt from opds_catalog_series where lang_code=%(lang_code)s and upper(ser) like '%(chars)s%%' where lang_code=%(lang_code)s and upper(ser) like '%(chars)s%%%%' group by upper(substring(ser,1,%(length)s)) order by id"""%{'length':length, 'lang_code':self.lang_code, 'chars':chars} else: sql="""select %(length)s as l, upper(substring(ser,1,%(length)s)) as id, count(*) as cnt from opds_catalog_series where upper(ser) like '%(chars)s%%' where upper(ser) like '%(chars)s%%%%' group by upper(substring(ser,1,%(length)s)) order by id"""%{'length':length,'chars':chars} Loading
sopds_web_backend/__pycache__/views.cpython-35.pyc −19 B (14.1 KiB) File changed.No diff preview for this file type. View original file View changed file
sopds_web_backend/views.py +1 −2 Original line number Diff line number Diff line Loading @@ -398,7 +398,6 @@ def BooksView(request): group by upper(substring(title,1,%(length)s)) order by id"""%{'length':length,'chars':chars} print(sql) items = Book.objects.raw(sql) args['items']=items Loading