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/main.py

32 lines
547 B

7 years ago
from flask import Flask
7 years ago
from flask import Blueprint,render_template
import views
7 years ago
7 years ago
app = Flask(__name__)
7 years ago
app.debug = True
7 years ago
7 years ago
7 years ago
@app.route("/h")
7 years ago
def hello():
7 years ago
return "Hello World!"
7 years ago
7 years ago
@app.route("/")
7 years ago
def index():
return render_template('default/index.html')
7 years ago
def setting_modules(app, modules):
for module, url_prefix in modules:
app.register_blueprint(module, url_prefix=url_prefix)
DEFAULT_MODULES = (
(views.frontend, "/"),
)
setting_modules(DEFAULT_MODULES, url_prefix=url_prefix)
7 years ago
if __name__ == "__main__":
app.run()