endorsement/app.py

26 lines
654 B
Python
Raw Normal View History

import os
from flask import Flask, send_from_directory
2018-07-12 19:45:52 +02:00
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__, static_url_path='/public')
app.config.from_object('config.Configuration')
2018-07-12 19:45:52 +02:00
db = SQLAlchemy(app)
@app.route('/js/<path:path>')
def send_js(path):
return send_from_directory('public/js', path)
@app.route('/css/<path:path>')
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')