1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-25 17:40:31 +00:00
Improved testablility
Added feedback for book_edit -> stay on edit page
This commit is contained in:
Ozzie Isaacs 2018-10-03 21:18:08 +02:00
parent 23633f1665
commit 7253f583cf
2 changed files with 4 additions and 1 deletions

View File

@ -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>

View File

@ -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()