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
61d628d5
Commit
61d628d5
authored
Aug 26, 2020
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oauth problem solved
parent
d89830af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
web.py
cps/web.py
+6
-5
No files found.
cps/web.py
View file @
61d628d5
...
...
@@ -1658,9 +1658,10 @@ def profile():
kobo_support
=
feature_support
[
'kobo'
]
and
config
.
config_kobo_sync
if
feature_support
[
'oauth'
]
and
config
.
config_login_type
==
2
:
oauth_status
=
get_oauth_status
()
local_oauth_check
=
oauth_check
else
:
oauth_status
=
None
oauth_check
=
{}
local_
oauth_check
=
{}
for
book
in
current_user
.
downloads
:
downloadBook
=
calibre_db
.
get_book
(
book
.
book_id
)
...
...
@@ -1684,7 +1685,7 @@ def profile():
return
render_title_template
(
"user_edit.html"
,
content
=
current_user
,
downloads
=
downloads
,
title
=
_
(
u"
%(name)
s's profile"
,
name
=
current_user
.
nickname
),
page
=
"me"
,
kobo_support
=
kobo_support
,
registered_oauth
=
oauth_check
,
oauth_status
=
oauth_status
)
registered_oauth
=
local_
oauth_check
,
oauth_status
=
oauth_status
)
if
"nickname"
in
to_save
and
to_save
[
"nickname"
]
!=
current_user
.
nickname
:
# Query User nickname, if not existing, change
if
not
ub
.
session
.
query
(
ub
.
User
)
.
filter
(
ub
.
User
.
nickname
==
to_save
[
"nickname"
])
.
scalar
():
...
...
@@ -1697,7 +1698,7 @@ def profile():
kobo_support
=
kobo_support
,
new_user
=
0
,
content
=
current_user
,
downloads
=
downloads
,
registered_oauth
=
oauth_check
,
registered_oauth
=
local_
oauth_check
,
title
=
_
(
u"Edit User
%(nick)
s"
,
nick
=
current_user
.
nickname
),
page
=
"edituser"
)
...
...
@@ -1728,13 +1729,13 @@ def profile():
return
render_title_template
(
"user_edit.html"
,
content
=
current_user
,
downloads
=
downloads
,
translations
=
translations
,
kobo_support
=
kobo_support
,
title
=
_
(
u"
%(name)
s's profile"
,
name
=
current_user
.
nickname
),
page
=
"me"
,
registered_oauth
=
oauth_check
,
oauth_status
=
oauth_status
)
registered_oauth
=
local_
oauth_check
,
oauth_status
=
oauth_status
)
flash
(
_
(
u"Profile updated"
),
category
=
"success"
)
log
.
debug
(
u"Profile updated"
)
return
render_title_template
(
"user_edit.html"
,
translations
=
translations
,
profile
=
1
,
languages
=
languages
,
content
=
current_user
,
downloads
=
downloads
,
kobo_support
=
kobo_support
,
title
=
_
(
u"
%(name)
s's profile"
,
name
=
current_user
.
nickname
),
page
=
"me"
,
registered_oauth
=
oauth_check
,
oauth_status
=
oauth_status
)
page
=
"me"
,
registered_oauth
=
local_
oauth_check
,
oauth_status
=
oauth_status
)
# ###################################Show single book ##################################################################
...
...
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