1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00
ihatemoney_ynh/budget/run.py
Alexis Metaireau ef353d643c Refactor the application to use blueprints.
This allows to isolate some behavior in the context of the web application so
the API and the web application can behave in different ways.
2011-09-09 21:21:37 +02:00

22 lines
329 B
Python

from web import main, db, mail
import api
from flask import *
app = Flask(__name__)
app.config.from_object("default_settings")
app.register_blueprint(main)
# db
db.init_app(app)
db.app = app
db.create_all()
# mail
mail.init_app(app)
def main():
app.run(host="0.0.0.0", debug=True)
if __name__ == '__main__':
main()