Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdserver-web/web/admin/config/__init__.py

40 lines
1.3 KiB

7 months ago
# coding:utf-8
# ---------------------------------------------------------------------------------
# MW-Linux面板
# ---------------------------------------------------------------------------------
# copyright (c) 2018-∞(https://github.com/midoks/mdserver-web) All rights reserved.
# ---------------------------------------------------------------------------------
# Author: midoks <midoks@163.com>
# ---------------------------------------------------------------------------------
from flask import Blueprint, render_template
7 months ago
from flask import request
7 months ago
7 months ago
from admin import model
import core.mw as mw
# 默认页面
blueprint = Blueprint('config', __name__, url_prefix='/config', template_folder='../../templates')
7 months ago
@blueprint.route('/index', endpoint='index')
def index():
7 months ago
return render_template('default/config.html')
7 months ago
@blueprint.route('/get_panel_list', endpoint='get_panel_list', methods=['POST'])
def get_panel_list():
7 months ago
return []
# 设置面板名称
@blueprint.route('/set_webname', endpoint='set_webname', methods=['POST'])
def set_webname():
webname = request.form.get('webname', '')
src_webname = model.getOption('title')
if webname != src_webname:
model.setOption('title', webname)
return mw.returnData(True, '面板别名保存成功!')