diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2011-08-10 00:53:15 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-08-10 00:53:15 +0200 |
| commit | 5c44e495b7e861b642b1c7aec443e2795fd80600 (patch) | |
| tree | d3aa6129548c80b9837b524ffa4144f91e32bd7b /budget/web.py | |
| parent | 8050defa8fe0bbce8f941a567ee467f4d1cb1501 (diff) | |
| download | ihatemoney-mirror-5c44e495b7e861b642b1c7aec443e2795fd80600.zip ihatemoney-mirror-5c44e495b7e861b642b1c7aec443e2795fd80600.tar.gz ihatemoney-mirror-5c44e495b7e861b642b1c7aec443e2795fd80600.tar.bz2 | |
get ready for production, baby :)
Diffstat (limited to 'budget/web.py')
| -rw-r--r-- | budget/web.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/budget/web.py b/budget/web.py index 661b139..b98e764 100644 --- a/budget/web.py +++ b/budget/web.py @@ -14,6 +14,15 @@ app = Flask(__name__) app.config.from_object("default_settings") mail = Mail() +# db +db.init_app(app) +db.app = app +db.create_all() + +# mail +mail.init_app(app) + + @app.route("/") def home(): project_form = ProjectForm() @@ -199,14 +208,6 @@ def delete_bill(project, bill_id): 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) if __name__ == '__main__': |
