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
74a3e684
Commit
74a3e684
authored
Mar 12, 2017
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'kennyl/travis'
# Conflicts: # cps/web.py
parents
b081bc86
2ef4933f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
book_edit.html
cps/templates/book_edit.html
+0
-2
detail.html
cps/templates/detail.html
+1
-1
web.py
cps/web.py
+5
-1
No files found.
cps/templates/book_edit.html
View file @
74a3e684
...
...
@@ -150,9 +150,7 @@
</script>
<script
src=
"{{ url_for('static', filename='js/libs/typeahead.bundle.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/edit_books.js') }}"
></script>
<
<<<<<<
HEAD
<script
src=
"{{ url_for('static', filename='js/libs/bootstrap-rating-input.min.js') }}"
></script>
=======
<script
src=
"{{ url_for('static', filename='js/get_meta.js') }}"
></script>
{% endblock %}
{% block header %}
...
...
cps/templates/detail.html
View file @
74a3e684
...
...
@@ -126,7 +126,7 @@
</button>
<ul
class=
"dropdown-menu"
aria-labelledby=
"btnGroupDrop1"
>
{% for format in entry.data %}
<li><a
href=
"{{ url_for('get_download_link
', book_id=entry.id, format=format.format|lower
) }}"
>
{{format.format}}
</a></li>
<li><a
href=
"{{ url_for('get_download_link
_ext', book_id=entry.id, format=format.format|lower, anyname=entry.id|string+'.'+format.format
) }}"
>
{{format.format}}
</a></li>
{%endfor%}
</ul>
</div>
...
...
cps/web.py
View file @
74a3e684
...
...
@@ -1308,7 +1308,6 @@ def read_book(book_id, format):
flash
(
_
(
u"Error opening eBook. File does not exist or file is not accessible:"
),
category
=
"error"
)
return
redirect
(
url_for
(
"index"
))
@
app
.
route
(
"/download/<int:book_id>/<format>"
)
@
login_required_if_no_ano
@
download_required
...
...
@@ -1335,6 +1334,11 @@ def get_download_link(book_id, format):
else
:
abort
(
404
)
@
app
.
route
(
"/download/<int:book_id>/<format>/<anyname>"
)
@
login_required_if_no_ano
@
download_required
def
get_download_link_ext
(
book_id
,
format
,
anyname
):
return
get_download_link
(
book_id
,
format
)
@
app
.
route
(
'/register'
,
methods
=
[
'GET'
,
'POST'
])
def
register
():
...
...
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