This commit is contained in:
Mr Chen
2024-12-14 02:47:59 +08:00
parent af36366a89
commit 5278116f49
3 changed files with 7 additions and 4 deletions
+4 -1
View File
@@ -287,7 +287,10 @@ def show_panel_pwd():
def show_panel_adminpath():
admin_path = thisdb.getOption('admin_path')
print('/'+admin_path)
if admin_path == '':
print('/login')
else:
print('/'+admin_path)
def set_panel_username(username=None):
+1 -1
View File
@@ -28,7 +28,7 @@ import thisdb
blueprint = Blueprint('dashboard', __name__, url_prefix='/', template_folder='../../templates')
@blueprint.route('/')
@blueprint.route('/', endpoint='index', methods=['GET'])
@panel_login_required
def index():
name = thisdb.getOption('template', default='default')
+2 -2
View File
@@ -102,8 +102,8 @@ def login():
session['login'] = False
session['overdue'] = 0
db_path = thisdb.getOption('admin_path')
if db_path == '':
admin_path = thisdb.getOption('admin_path')
if admin_path == '':
return render_template('%s/login.html' % name)
else:
unauthorized_status = thisdb.getOption('unauthorized_status')