更新文件
This commit is contained in:
@@ -2,7 +2,7 @@ import requests
|
||||
import json
|
||||
from requests.exceptions import RequestException
|
||||
import platform
|
||||
from . import PyWebPageAPI
|
||||
from .. import PyWebPageAPI
|
||||
|
||||
UA = f"SolianForPythonApp/0.0.1(A) ({PyWebPageAPI.GetDeviceInfo()})"
|
||||
|
||||
|
@@ -1,6 +1,10 @@
|
||||
import flask
|
||||
from flask import Flask
|
||||
import os
|
||||
|
||||
app = flask.Flask(__name__, template_folder='../webfile', static_folder='../webfile/static')
|
||||
app = Flask(__name__)
|
||||
|
||||
app = flask.Flask(__name__, template_folder='../webfile', static_folder='../webfile/static', static_url_path='/static')
|
||||
|
||||
@app.errorhandler(500)
|
||||
def internal_server_error(error):
|
||||
@@ -19,11 +23,24 @@ def forbidden(error):
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return flask.render_template('index.html')
|
||||
return flask.render_template('index.html',static_url_path='/static')
|
||||
|
||||
@app.route('/Account')
|
||||
def Account():
|
||||
return flask.render_template('Account.html')
|
||||
|
||||
@app.route('/Realm')
|
||||
def Realm():
|
||||
return flask.render_template('Realm.html')
|
||||
|
||||
|
||||
@app.route('/Chat')
|
||||
def Chat():
|
||||
return flask.render_template('Chat.html')
|
||||
|
||||
def AppStart(host: str, port: int):
|
||||
"""启动Flask应用"""
|
||||
app.run(host=host, port=port, debug=True, use_reloader=False)
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host="127.0.0.1", port=5000, debug=True)
|
||||
app.run(host="127.0.0.1", port=5000, debug=True)
|
Reference in New Issue
Block a user