mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
+4
-1
@@ -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):
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user