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
7253f583
Commit
7253f583
authored
Oct 03, 2018
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #650
Improved testablility Added feedback for book_edit -> stay on edit page
parent
23633f16
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
detail.html
cps/templates/detail.html
+1
-1
web.py
cps/web.py
+3
-0
No files found.
cps/templates/detail.html
View file @
7253f583
...
...
@@ -60,7 +60,7 @@
{% endif %}
</div>
</div>
<h2>
{{entry.title|shortentitle(40)}}
</h2>
<h2
id=
"title"
>
{{entry.title|shortentitle(40)}}
</h2>
<p
class=
"author"
>
{% for author in entry.authors %}
<a
href=
"{{url_for('author', book_id=author.id ) }}"
>
{{author.name.replace('|',',')}}
</a>
...
...
cps/web.py
View file @
7253f583
...
...
@@ -1752,6 +1752,8 @@ def authenticate_google_drive():
@
app
.
route
(
"/gdrive/callback"
)
def
google_drive_callback
():
auth_code
=
request
.
args
.
get
(
'code'
)
if
not
auth_code
:
abort
(
403
)
try
:
credentials
=
gdriveutils
.
Gauth
.
Instance
()
.
auth
.
flow
.
step2_exchange
(
auth_code
)
with
open
(
os
.
path
.
join
(
config
.
get_main_dir
,
'gdrive_credentials'
),
'w'
)
as
f
:
...
...
@@ -3689,6 +3691,7 @@ def edit_book(book_id):
if
"detail_view"
in
to_save
:
return
redirect
(
url_for
(
'show_book'
,
book_id
=
book
.
id
))
else
:
flash
(
_
(
"Metadata successfully updated"
),
category
=
"success"
)
return
render_edit_book
(
book_id
)
else
:
db
.
session
.
rollback
()
...
...
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