From e61514df1bba086d7a061425f3469112b78c604c Mon Sep 17 00:00:00 2001 From: cdhigh Date: Tue, 2 Jul 2024 08:00:40 -0300 Subject: [PATCH] fix login next url redirect failure --- application/view/login.py | 2 +- docs/Chinese/deployment.md | 6 +++--- docs/English/deployment.md | 6 +++--- main.py | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/application/view/login.py b/application/view/login.py index f869ca50..52b049f8 100644 --- a/application/view/login.py +++ b/application/view/login.py @@ -3,7 +3,7 @@ #登录页面和相关登录函数,包括重置密码,新建账号等 #Author: cdhigh import datetime, time, json -from urllib.parse import urljoin, urlencode +from urllib.parse import urljoin, urlencode, urlparse from flask import Blueprint, url_for, render_template, redirect, session, current_app as app from flask_babel import gettext as _ from ..base_handler import * diff --git a/docs/Chinese/deployment.md b/docs/Chinese/deployment.md index 13068bd6..b691fe4c 100644 --- a/docs/Chinese/deployment.md +++ b/docs/Chinese/deployment.md @@ -178,9 +178,9 @@ sudo docker compose -f docker-compose-nginx.yml up -d 4. 使用docker-compose的版本更新方法 ```bash -sudo docker compose pull -sudo docker compose up -d --remove-orphans -sudo docker image prune +sudo docker compose pull && \ +sudo docker compose up -d --remove-orphans && \ +sudo docker image prune -f ``` diff --git a/docs/English/deployment.md b/docs/English/deployment.md index e003b18f..8ba4fd30 100644 --- a/docs/English/deployment.md +++ b/docs/English/deployment.md @@ -183,9 +183,9 @@ If HTTPS for Nginx is needed, copy the SSL certificate fullchain.pem/privkey.pem 4. Method for Updating Using Docker Compose ```bash -sudo docker compose pull -sudo docker compose up -d --remove-orphans -sudo docker image prune +sudo docker compose pull && \ +sudo docker compose up -d --remove-orphans && \ +sudo docker image prune -f ``` diff --git a/main.py b/main.py index 0e377f54..ee75f6dc 100644 --- a/main.py +++ b/main.py @@ -25,6 +25,7 @@ builtins.__dict__['appDir'] = appDir builtins.__dict__['appVer'] = __Version__ sys.path.insert(0, os.path.join(appDir, 'application', 'lib')) +sys.path.insert(0, appDir) #合并config.py配置信息到os.environ,如果对应环境变量存在,则不会覆盖 def set_env():