From e96a2e61f6bd73c258c6f29cf56e84cef012e0dd Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Mon, 4 Sep 2017 23:23:07 -0700 Subject: [PATCH] Chapter 1: Hello, World! (v0.1) --- app/__init__.py | 5 +++++ app/routes.py | 7 +++++++ microblog.py | 1 + 3 files changed, 13 insertions(+) create mode 100644 app/__init__.py create mode 100644 app/routes.py create mode 100644 microblog.py diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..96c8ef5 --- /dev/null +++ b/app/__init__.py @@ -0,0 +1,5 @@ +from flask import Flask + +app = Flask(__name__) + +from app import routes diff --git a/app/routes.py b/app/routes.py new file mode 100644 index 0000000..69701e3 --- /dev/null +++ b/app/routes.py @@ -0,0 +1,7 @@ +from app import app + + +@app.route('/') +@app.route('/index') +def index(): + return "Hello, World!" diff --git a/microblog.py b/microblog.py new file mode 100644 index 0000000..d099b92 --- /dev/null +++ b/microblog.py @@ -0,0 +1 @@ +from app import app