Compare commits

..

No commits in common. "1cd836b35f7d59e7a6e9a16ed61a819ac66757d5" and "d6eb52bb3c969b5cf3319904bec80d277f01ad9d" have entirely different histories.

4 changed files with 7 additions and 7 deletions

2
app.py
View File

@ -22,7 +22,7 @@ app.register_blueprint(get_monsters_bp)
app.register_blueprint(get_monster_stats_bp)
# Register Serve Content Blueprints
app.register_blueprint(serve_content)
app.register_blueprint(serve_img_bp)
# Register Other Views Blurprints (HTML Render Templates)
app.register_blueprint(breed_info_bp)

View File

@ -1,2 +1 @@
flask
jsonify
flask

View File

@ -1,13 +1,14 @@
from flask import send_from_directory, Blueprint
serve_content = Blueprint('favicon', __name__)
serve_img_bp = Blueprint('favicon', __name__)
serve_monster_sprite_bp = Blueprint('monster_sprite', __name__)
#Serve Monster Sprites
@serve_content.route('/img/monster/<selected_monster>.png')
@serve_img_bp.route('/img/monster/<selected_monster>.png')
def serve_monster_sprite(selected_monster):
return send_from_directory('static/img/monster/', f'{selected_monster}.png')
#Serve Favicon
@serve_content.route('/img/favicon.ico')
@serve_img_bp.route('/img/favicon.ico')
def serve_favicon():
return send_from_directory( '','static/img/favicon.ico')

View File

@ -8,5 +8,5 @@ serve_monster_sprite_bp = Blueprint('monster_sprite', __name__)
#Serve Monster Sprites
@skills_bp.route('/skills')
def skills():
csv_data = read_csv('src/data/skills_data.csv')
csv_data = read_csv('src/skills_data.csv')
return render_template('skills.html', csv_data=csv_data)