{{title}}
{% if g.user.role_download() %}
-
{{ _('Download') }}
+
{{ _('Download') }}
{% endif %}
{% if g.user.is_authenticated %}
{% if (g.user.role_edit_shelfs() and shelf.is_public ) or not shelf.is_public %}
diff --git a/cps/web.py b/cps/web.py
index 5c2151f6..2f1f047b 100644
--- a/cps/web.py
+++ b/cps/web.py
@@ -419,8 +419,8 @@ def get_matching_tags():
title_input = request.args.get('book_title')
include_tag_inputs = request.args.getlist('include_tag')
exclude_tag_inputs = request.args.getlist('exclude_tag')
- q = q.filter(db.Books.authors.any(db.func.lower(db.Authors.name).ilike("%" + author_input + "%")),
- db.func.lower(db.Books.title).ilike("%" + title_input + "%"))
+ q = q.filter(db.Books.authors.any(func.lower(db.Authors.name).ilike("%" + author_input + "%")),
+ func.lower(db.Books.title).ilike("%" + title_input + "%"))
if len(include_tag_inputs) > 0:
for tag in include_tag_inputs:
q = q.filter(db.Books.tags.any(db.Tags.id == tag))
@@ -858,15 +858,15 @@ def advanced_search():
searchterm = " + ".join(filter(None, searchterm))
q = q.filter()
if author_name:
- q = q.filter(db.Books.authors.any(db.func.lower(db.Authors.name).ilike("%" + author_name + "%")))
+ q = q.filter(db.Books.authors.any(func.lower(db.Authors.name).ilike("%" + author_name + "%")))
if book_title:
- q = q.filter(db.func.lower(db.Books.title).ilike("%" + book_title + "%"))
+ q = q.filter(func.lower(db.Books.title).ilike("%" + book_title + "%"))
if pub_start:
q = q.filter(db.Books.pubdate >= pub_start)
if pub_end:
q = q.filter(db.Books.pubdate <= pub_end)
if publisher:
- q = q.filter(db.Books.publishers.any(db.func.lower(db.Publishers.name).ilike("%" + publisher + "%")))
+ q = q.filter(db.Books.publishers.any(func.lower(db.Publishers.name).ilike("%" + publisher + "%")))
for tag in include_tag_inputs:
q = q.filter(db.Books.tags.any(db.Tags.id == tag))
for tag in exclude_tag_inputs:
@@ -889,7 +889,7 @@ def advanced_search():
rating_low = int(rating_low) * 2
q = q.filter(db.Books.ratings.any(db.Ratings.rating >= rating_low))
if description:
- q = q.filter(db.Books.comments.any(db.func.lower(db.Comments.text).ilike("%" + description + "%")))
+ q = q.filter(db.Books.comments.any(func.lower(db.Comments.text).ilike("%" + description + "%")))
# search custom culumns
for c in cc:
@@ -903,7 +903,7 @@ def advanced_search():
db.cc_classes[c.id].value == custom_query))
else:
q = q.filter(getattr(db.Books, 'custom_column_'+str(c.id)).any(
- db.func.lower(db.cc_classes[c.id].value).ilike("%" + custom_query + "%")))
+ func.lower(db.cc_classes[c.id].value).ilike("%" + custom_query + "%")))
q = q.all()
ids = list()
for element in q:
diff --git a/cps/worker.py b/cps/worker.py
index 3d5f058a..a33ad99d 100644
--- a/cps/worker.py
+++ b/cps/worker.py
@@ -140,6 +140,7 @@ class emailbase():
else:
raise smtplib.SMTPServerDisconnected('please run connect() first')
+ @classmethod
def _print_debug(self, *args):
log.debug(args)
diff --git a/setup.cfg b/setup.cfg
index 6bcd9931..470a13d9 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,7 +2,7 @@
universal = 1
[metadata]
-name = calibre-web
+name = calibreweb
version= 0.6.3
url = https://github.com/janeczku/calibre-web
project_urls =