2019-08-04 22:27:47 +02:00
|
|
|
import os
|
|
|
|
|
|
|
|
from flask import Flask, send_from_directory
|
2018-07-12 19:45:52 +02:00
|
|
|
from flask_sqlalchemy import SQLAlchemy
|
|
|
|
|
2019-08-04 22:27:47 +02:00
|
|
|
app = Flask(__name__, static_url_path='/public')
|
2018-07-12 21:37:37 +02:00
|
|
|
app.config.from_object('config.Configuration')
|
2018-07-12 19:45:52 +02:00
|
|
|
db = SQLAlchemy(app)
|
2019-08-04 22:27:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
@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')
|