dwm-app/app.py

39 lines
961 B
Python
Raw Normal View History

from flask import Flask, render_template
2024-02-15 15:46:33 +00:00
from src.util.utils import *
from src.api.get_monsters import *
from src.api.get_families import *
from src.api.get_monster_stats import *
2024-01-30 16:06:00 +00:00
from src.views.serve_content import *
from src.views.monster_stats import *
from src.views.breed_info import *
from src.views.skills import *
2024-02-14 20:55:41 +00:00
app = Flask(__name__)
2024-01-30 16:06:00 +00:00
# Utils
app.before_request(before_request)
app.teardown_request(teardown_request)
2024-02-02 02:52:59 +00:00
# Register API Blueprints
app.register_blueprint(get_families_bp)
app.register_blueprint(get_monsters_bp)
app.register_blueprint(get_monster_stats_bp)
2024-02-15 15:46:33 +00:00
# Register Serve Content Blueprints
app.register_blueprint(serve_img_bp)
2024-02-15 15:46:33 +00:00
# Register Other Views Blurprints (HTML Render Templates)
app.register_blueprint(breed_info_bp)
app.register_blueprint(skills_bp)
2024-02-15 15:46:33 +00:00
2024-02-02 02:52:59 +00:00
@app.route("/")
2024-02-04 20:21:15 +00:00
def show_app():
js_files = get_js_files()
2024-02-04 20:21:15 +00:00
return render_template("app.html", js_files=js_files)
2024-01-30 16:06:00 +00:00
2024-01-30 23:21:26 +00:00
if __name__ == "__main__":
2024-01-30 16:06:00 +00:00
app.run(debug=True)