Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
fed9eff7
Unverified
Commit
fed9eff7
authored
Sep 25, 2021
by
xlivevil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the publishstart option in advsearch
parent
bf5de95f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
search_form.html
cps/templates/search_form.html
+1
-1
web.py
cps/web.py
+2
-2
No files found.
cps/templates/search_form.html
View file @
fed9eff7
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<div
class=
"form-group col-sm-6"
>
<div
class=
"form-group col-sm-6"
>
<label
for=
"publishstart"
>
{{_('Published Date From')}}
</label>
<label
for=
"publishstart"
>
{{_('Published Date From')}}
</label>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
type=
"text"
style=
"position: static;"
class=
"datepicker form-control"
name=
"publish
_
start"
id=
"publishstart"
value=
""
>
<input
type=
"text"
style=
"position: static;"
class=
"datepicker form-control"
name=
"publishstart"
id=
"publishstart"
value=
""
>
<input
type=
"text"
style=
"position: absolute;"
class=
"form-control fake-input hidden"
id=
"fake_publishstart"
value=
""
>
<input
type=
"text"
style=
"position: absolute;"
class=
"form-control fake-input hidden"
id=
"fake_publishstart"
value=
""
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<button
type=
"button"
id=
"publishstart_delete"
class=
"datepicker_delete btn btn-default"
><span
class=
"glyphicon glyphicon-remove-circle"
></span></button>
<button
type=
"button"
id=
"publishstart_delete"
class=
"datepicker_delete btn btn-default"
><span
class=
"glyphicon glyphicon-remove-circle"
></span></button>
...
...
cps/web.py
View file @
fed9eff7
...
@@ -1224,7 +1224,7 @@ def extend_search_term(searchterm,
...
@@ -1224,7 +1224,7 @@ def extend_search_term(searchterm,
format_date
(
datetime
.
strptime
(
pub_end
,
"
%
Y-
%
m-
%
d"
),
format_date
(
datetime
.
strptime
(
pub_end
,
"
%
Y-
%
m-
%
d"
),
format
=
'medium'
,
locale
=
get_locale
())])
format
=
'medium'
,
locale
=
get_locale
())])
except
ValueError
:
except
ValueError
:
pub_
start
=
u""
pub_
end
=
u""
elements
=
{
'tag'
:
db
.
Tags
,
'serie'
:
db
.
Series
,
'shelf'
:
ub
.
Shelf
}
elements
=
{
'tag'
:
db
.
Tags
,
'serie'
:
db
.
Series
,
'shelf'
:
ub
.
Shelf
}
for
key
,
db_element
in
elements
.
items
():
for
key
,
db_element
in
elements
.
items
():
tag_names
=
calibre_db
.
session
.
query
(
db_element
)
.
filter
(
db_element
.
id
.
in_
(
tags
[
'include_'
+
key
]))
.
all
()
tag_names
=
calibre_db
.
session
.
query
(
db_element
)
.
filter
(
db_element
.
id
.
in_
(
tags
[
'include_'
+
key
]))
.
all
()
...
@@ -1295,7 +1295,7 @@ def render_adv_search_results(term, offset=None, order=None, limit=None):
...
@@ -1295,7 +1295,7 @@ def render_adv_search_results(term, offset=None, order=None, limit=None):
column_end
=
term
.
get
(
'custom_column_'
+
str
(
c
.
id
)
+
'_end'
)
column_end
=
term
.
get
(
'custom_column_'
+
str
(
c
.
id
)
+
'_end'
)
if
column_start
:
if
column_start
:
searchterm
.
extend
([
u"{} >= {}"
.
format
(
c
.
name
,
searchterm
.
extend
([
u"{} >= {}"
.
format
(
c
.
name
,
format_date
(
datetime
.
strptime
(
column_start
,
"
%
Y-
%
m-
%
d"
),
format_date
(
datetime
.
strptime
(
column_start
,
"
%
Y-
%
m-
%
d"
)
.
date
()
,
format
=
'medium'
,
format
=
'medium'
,
locale
=
get_locale
())
locale
=
get_locale
())
)])
)])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment