mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
put back stuff in the wrong place for now
This commit is contained in:
parent
ab44f253cd
commit
929833cc04
1 changed files with 9 additions and 8 deletions
|
@ -14,6 +14,15 @@ app = Flask(__name__)
|
||||||
app.config.from_object("default_settings")
|
app.config.from_object("default_settings")
|
||||||
mail = Mail()
|
mail = Mail()
|
||||||
|
|
||||||
|
# db
|
||||||
|
db.init_app(app)
|
||||||
|
db.app = app
|
||||||
|
db.create_all()
|
||||||
|
|
||||||
|
# mail
|
||||||
|
mail.init_app(app)
|
||||||
|
|
||||||
|
|
||||||
@app.url_defaults
|
@app.url_defaults
|
||||||
def add_project_id(endpoint, values):
|
def add_project_id(endpoint, values):
|
||||||
if 'project_id' in values or not hasattr(g, 'project'):
|
if 'project_id' in values or not hasattr(g, 'project'):
|
||||||
|
@ -243,14 +252,6 @@ def reset_bills():
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# db
|
|
||||||
db.init_app(app)
|
|
||||||
db.app = app
|
|
||||||
db.create_all()
|
|
||||||
|
|
||||||
# mail
|
|
||||||
mail.init_app(app)
|
|
||||||
|
|
||||||
app.run(host="0.0.0.0", debug=True)
|
app.run(host="0.0.0.0", debug=True)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue