import os from flask import Flask, send_from_directory from flask_sqlalchemy import SQLAlchemy app = Flask(__name__, static_url_path='/public') app.config.from_object('config.Configuration') db = SQLAlchemy(app) @app.route('/js/') def send_js(path): return send_from_directory('public/js', path) @app.route('/css/') def send_css(path): return send_from_directory('public/css', path) @app.route('/favicon.ico') def favicon(): return send_from_directory(os.path.join(app.root_path, 'public', 'img'), 'favicon.ico', mimetype='image/vnd.microsoft.icon')