From 2207622bbf63105688620f05b58e2cb6ba512414 Mon Sep 17 00:00:00 2001 From: Cervinko Cera Date: Wed, 20 Apr 2016 00:23:14 +0200 Subject: [PATCH] fix for edit page after upload --- config.ini | 12 ++++++------ cps/web.py | 6 +++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/config.ini b/config.ini index 1bca2dc1..8f265869 100644 --- a/config.ini +++ b/config.ini @@ -1,12 +1,12 @@ [General] -DB_ROOT = -APP_DB_ROOT = -MAIN_DIR = -LOG_DIR = +DB_ROOT = /home/christoph/Calibre-Bibliothek_test +APP_DB_ROOT = /home/christoph/computer/calibre-web +MAIN_DIR = /home/christoph/computer/calibre-web +LOG_DIR = /home/christoph/computer/calibre-web PORT = 8083 NEWEST_BOOKS = 60 [Advanced] TITLE_REGEX = ^(A|The|An|Der|Die|Das|Den|Ein|Eine|Einen|Dem|Des|Einem|Eines)\s+ -DEVELOPMENT = 0 +DEVELOPMENT = 1 PUBLIC_REG = 0 -UPLOADING = 0 +UPLOADING = 1 diff --git a/cps/web.py b/cps/web.py index 28512c23..b6863a2b 100755 --- a/cps/web.py +++ b/cps/web.py @@ -896,4 +896,8 @@ def upload(): db.session.add(db_book) db.session.commit() - return render_template('edit_book.html', book=db_book) + author_names = [] + for author in db_book.authors: + author_names.append(author.name) + + return render_template('edit_book.html', book=db_book, authors=author_names)