mirror of https://github.com/midoks/mdserver-web
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.
23 lines
484 B
23 lines
484 B
7 years ago
|
from flask import Flask
|
||
|
# from flask import Blueprint,render_template
|
||
|
from views import dashboard, site, files, soft
|
||
|
|
||
|
app = Flask(__name__)
|
||
|
app.debug = True
|
||
|
|
||
|
DEFAULT_MODULES = (
|
||
|
(dashboard, "/"),
|
||
|
(site, "/site"),
|
||
|
(files, "/files"),
|
||
|
(soft, "/soft")
|
||
|
)
|
||
|
|
||
|
def setting_modules(app, modules):
|
||
|
for module, url_prefix in modules:
|
||
|
app.register_blueprint(module, url_prefix=url_prefix)
|
||
|
|
||
|
setting_modules(app, DEFAULT_MODULES)
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
app.run()
|