Compare commits
No commits in common. "08d14b61d1d41393f3e9d2c981b977baa67d008e" and "048c79d20d3f31a6a548890994591bad3881463d" have entirely different histories.
08d14b61d1
...
048c79d20d
28
app.py
28
app.py
@ -1,14 +1,17 @@
|
|||||||
from flask import Flask, render_template
|
from flask import Flask, render_template
|
||||||
|
|
||||||
from api.get_monsters import *
|
from src.util.utils import *
|
||||||
from api.get_families import *
|
|
||||||
from api.get_monster_stats import *
|
|
||||||
from api.get_breeding_pairs import *
|
|
||||||
from api.get_breeding_usage import *
|
|
||||||
from api.get_skills_data import *
|
|
||||||
|
|
||||||
from utils.utils import *
|
from src.api.get_monsters import *
|
||||||
from utils.serve_media import *
|
from src.api.get_families import *
|
||||||
|
from src.api.get_monster_stats import *
|
||||||
|
from src.api.get_breeding_pairs import *
|
||||||
|
from src.api.get_breeding_usage import *
|
||||||
|
from src.api.get_skills_data import *
|
||||||
|
|
||||||
|
from src.views.serve_content import *
|
||||||
|
|
||||||
|
from src.views.skills import *
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
@ -25,20 +28,15 @@ app.register_blueprint(get_breeding_usage_bp)
|
|||||||
app.register_blueprint(get_skills_data_bp)
|
app.register_blueprint(get_skills_data_bp)
|
||||||
|
|
||||||
# Register Serve Content Blueprints
|
# Register Serve Content Blueprints
|
||||||
app.register_blueprint(serve_media)
|
app.register_blueprint(serve_content)
|
||||||
|
|
||||||
# Register Other Views Blurprints (HTML Render Templates)
|
# Register Other Views Blurprints (HTML Render Templates)
|
||||||
#app.register_blueprint(skills_bp)
|
app.register_blueprint(skills_bp)
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def show_app():
|
def show_app():
|
||||||
js_files = get_js_files()
|
js_files = get_js_files()
|
||||||
return render_template("app.html", js_files=js_files)
|
return render_template("app.html", js_files=js_files)
|
||||||
|
|
||||||
@app.route('/skills')
|
|
||||||
def skills():
|
|
||||||
csv_data = read_csv('static/data/skills_data.csv')
|
|
||||||
return render_template('skills.html', csv_data=csv_data)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(debug=True)
|
app.run(debug=True)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from flask import jsonify, Blueprint
|
from flask import jsonify, Blueprint
|
||||||
from utils.utils import breeding_pair_data
|
from ..util.utils import breeding_pair_data
|
||||||
|
|
||||||
get_breeding_pairs_bp = Blueprint('breeding_pairs',__name__)
|
get_breeding_pairs_bp = Blueprint('breeding_pairs',__name__)
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
from flask import jsonify, Blueprint
|
from flask import jsonify, Blueprint
|
||||||
from utils.utils import breeding_pair_data
|
from ..util.utils import breeding_pair_data
|
||||||
|
|
||||||
get_breeding_usage_bp = Blueprint('breeding_usage',__name__)
|
get_breeding_usage_bp = Blueprint('breeding_usage',__name__)
|
||||||
|
|
0
src/views/__innit__.py
Normal file
0
src/views/__innit__.py
Normal file
@ -1,13 +1,13 @@
|
|||||||
from flask import send_from_directory, Blueprint
|
from flask import send_from_directory, Blueprint
|
||||||
|
|
||||||
serve_media = Blueprint('favicon', __name__)
|
serve_content = Blueprint('favicon', __name__)
|
||||||
|
|
||||||
#Serve Monster Sprites
|
#Serve Monster Sprites
|
||||||
@serve_media.route('/img/monster/<selected_monster>.png')
|
@serve_content.route('/img/monster/<selected_monster>.png')
|
||||||
def serve_monster_sprite(selected_monster):
|
def serve_monster_sprite(selected_monster):
|
||||||
return send_from_directory('static/img/monster/', f'{selected_monster}.png')
|
return send_from_directory('static/img/monster/', f'{selected_monster}.png')
|
||||||
|
|
||||||
#Serve Favicon
|
#Serve Favicon
|
||||||
@serve_media.route('/img/favicon.ico')
|
@serve_content.route('/img/favicon.ico')
|
||||||
def serve_favicon():
|
def serve_favicon():
|
||||||
return send_from_directory( '','static/img/favicon.ico')
|
return send_from_directory( '','static/img/favicon.ico')
|
12
src/views/skills.py
Normal file
12
src/views/skills.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from flask import Blueprint, render_template
|
||||||
|
|
||||||
|
from ..util.utils import *
|
||||||
|
|
||||||
|
skills_bp = Blueprint('skills', __name__)
|
||||||
|
serve_monster_sprite_bp = Blueprint('monster_sprite', __name__)
|
||||||
|
|
||||||
|
#Serve Monster Sprites
|
||||||
|
@skills_bp.route('/skills')
|
||||||
|
def skills():
|
||||||
|
csv_data = read_csv('static/data/skills_data.csv')
|
||||||
|
return render_template('skills.html', csv_data=csv_data)
|
Loading…
Reference in New Issue
Block a user