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
1030e195
Commit
1030e195
authored
May 11, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #916
parent
479b4b7d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
helper.py
cps/helper.py
+2
-6
web.py
cps/web.py
+0
-6
No files found.
cps/helper.py
View file @
1030e195
...
...
@@ -130,7 +130,7 @@ def send_registration_mail(e_mail, user_name, default_password, resend=False):
text
+=
"Sincerely
\r\n\r\n
"
text
+=
"Your Calibre-Web team"
global_WorkerThread
.
add_email
(
_
(
u'Get Started with Calibre-Web'
),
None
,
None
,
ub
.
get_mail_settings
(),
e_mail
,
user_nam
e
,
_
(
u"Registration e-mail for user:
%(name)
s"
,
name
=
user_name
),
text
)
e_mail
,
Non
e
,
_
(
u"Registration e-mail for user:
%(name)
s"
,
name
=
user_name
),
text
)
return
def
check_send_to_kindle
(
entry
):
...
...
@@ -568,17 +568,13 @@ def json_serial(obj):
return
obj
.
isoformat
()
raise
TypeError
(
"Type
%
s not serializable"
%
type
(
obj
))
# helper function to apply localize status information in tasklist entries
def
render_task_status
(
tasklist
):
#helper function to apply localize status information in tasklist entries
renderedtasklist
=
list
()
# task2 = task
for
task
in
tasklist
:
if
task
[
'user'
]
==
current_user
.
nickname
or
current_user
.
role_admin
():
# task2 = copy.deepcopy(task) # = task
if
task
[
'formStarttime'
]:
task
[
'starttime'
]
=
format_datetime
(
task
[
'formStarttime'
],
format
=
'short'
,
locale
=
web
.
get_locale
())
# task2['formStarttime'] = ""
else
:
if
'starttime'
not
in
task
:
task
[
'starttime'
]
=
""
...
...
cps/web.py
View file @
1030e195
...
...
@@ -1643,14 +1643,8 @@ def bookmark(book_id, book_format):
@
login_required
def
get_tasks_status
():
# if current user admin, show all email, otherwise only own emails
answer
=
list
()
# UIanswer=list()
tasks
=
helper
.
global_WorkerThread
.
get_taskstatus
()
# answer = tasks
# UIanswer = copy.deepcopy(answer)
answer
=
helper
.
render_task_status
(
tasks
)
# foreach row format row
return
render_title_template
(
'tasks.html'
,
entries
=
answer
,
title
=
_
(
u"Tasks"
),
page
=
"tasks"
)
...
...
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