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
23b3bfd9
Commit
23b3bfd9
authored
Aug 20, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional fix #1016
parent
f543d7f4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
__init__.py
cps/services/__init__.py
+1
-1
config_edit.html
cps/templates/config_edit.html
+1
-1
web.py
cps/web.py
+3
-3
No files found.
cps/services/__init__.py
View file @
23b3bfd9
...
...
@@ -27,7 +27,7 @@ log = logger.create()
try
:
from
.
import
goodreads_support
except
ImportError
as
err
:
log
.
debug
(
"cannot import goodreads, showing authors-metadata will not work:
%
s"
,
err
)
goodreads
=
None
goodreads
_support
=
None
try
:
from
.
import
simpleldap
as
ldap
...
...
cps/templates/config_edit.html
View file @
23b3bfd9
...
...
@@ -172,7 +172,7 @@
{% if feature_support['goodreads'] %}
<div
class=
"form-group"
>
<input
type=
"checkbox"
id=
"config_use_goodreads"
name=
"config_use_goodreads"
data-control=
"goodreads-settings"
{%
if
config
.
config_use_goodreads
%}
checked
{%
endif
%}
>
<label
for=
"config_use_goodreads"
>
{{_('Use
')}} Goodreads
</label>
<label
for=
"config_use_goodreads"
>
{{_('Use
Goodreads')}}
</label>
<a
href=
"https://www.goodreads.com/api/keys"
target=
"_blank"
style=
"margin-left: 5px"
>
{{_('Obtain an API Key')}}
</a>
</div>
<div
data-related=
"goodreads-settings"
>
...
...
cps/web.py
View file @
23b3bfd9
...
...
@@ -565,9 +565,9 @@ def render_author_books(page, author_id, order):
author_info
=
None
other_books
=
[]
if
services
.
goodreads
and
config
.
config_use_goodreads
:
author_info
=
services
.
goodreads
.
get_author_info
(
author_name
)
other_books
=
services
.
goodreads
.
get_other_books
(
author_info
,
entries
)
if
services
.
goodreads
_support
and
config
.
config_use_goodreads
:
author_info
=
services
.
goodreads
_support
.
get_author_info
(
author_name
)
other_books
=
services
.
goodreads
_support
.
get_other_books
(
author_info
,
entries
)
return
render_title_template
(
'author.html'
,
entries
=
entries
,
pagination
=
pagination
,
id
=
author_id
,
title
=
_
(
u"Author:
%(name)
s"
,
name
=
author_name
),
author
=
author_info
,
...
...
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