From f434511db88f5b946077f771347401aee5526f06 Mon Sep 17 00:00:00 2001 From: OzzieIsaacs Date: Thu, 29 Dec 2016 10:30:42 +0100 Subject: [PATCH] Fixed lout issue with redirects fixed database migration problem which was introduced with the shelf order commit --- cps/ub.py | 2 +- cps/web.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cps/ub.py b/cps/ub.py index 1056ddd6..40839aa1 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -179,7 +179,7 @@ def migrate_Database(): session.commit() except exc.OperationalError: # Database is not compatible, some rows are missing conn = engine.connect() - conn.execute("ALTER TABLE book_shelf_link ADD column order INTEGER DEFAULT 1") + conn.execute("ALTER TABLE book_shelf_link ADD column `order` INTEGER DEFAULT 1") session.commit() diff --git a/cps/web.py b/cps/web.py index 527781af..e11c1ee6 100755 --- a/cps/web.py +++ b/cps/web.py @@ -164,7 +164,8 @@ app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT' LANGUAGES = { 'en': 'English', 'de': 'Deutsch', - 'fr': 'Français' + 'fr': 'Français', + 'es': 'Español' } @@ -1190,7 +1191,7 @@ def login(): def logout(): if current_user is not None and current_user.is_authenticated: logout_user() - return redirect(url_for("index", _external=True)) + return redirect('/login' or url_for("login", _external=True)) @app.route('/send/')