From 723cabbe72db7c65de6708a7baaacee58f12c4ff Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 2 Jul 2018 10:46:02 +0200 Subject: [PATCH] [Refactor] Move the application running code from __init__ to __main__ --- calsocial/__init__.py | 4 ---- calsocial/__main__.py | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 calsocial/__main__.py diff --git a/calsocial/__init__.py b/calsocial/__init__.py index bef298f..7697316 100644 --- a/calsocial/__init__.py +++ b/calsocial/__init__.py @@ -121,7 +121,3 @@ def new_event(): return redirect(url_for('hello')) return render_template('event-edit.html', form=form) - - -if __name__ == '__main__': - app.run() diff --git a/calsocial/__main__.py b/calsocial/__main__.py new file mode 100644 index 0000000..0206b89 --- /dev/null +++ b/calsocial/__main__.py @@ -0,0 +1,6 @@ +from calsocial import CalendarSocialApp + + +app = CalendarSocialApp('calsocial') + +app.run()