From 2dde04cb6597c6d2a27ff38d1c158f29c9400bc4 Mon Sep 17 00:00:00 2001 From: debrice Date: Sun, 5 Feb 2012 20:00:43 -0800 Subject: [PATCH] Add db initialization --- Large-app-how-to.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Large-app-how-to.md b/Large-app-how-to.md index f09eb2c..7ba85ae 100644 --- a/Large-app-how-to.md +++ b/Large-app-how-to.md @@ -386,9 +386,16 @@ Here is the `/app/__init__.py` #app.register_blueprint(commentsModule) #app.register_blueprint(postsModule) -now you can go in your root, activate your virtual env and run `python run.py` ... something like: +Let's activate your virtual env and initialize your database: brice@Brice:~/Projects/dev$ . env/bin/activate + (env)brice@Brice:~/Projects/dev1$ python shell.py + >>> from app import db + >>> db.create_all() + >>> exit() + +now you can go in your root and run `python run.py` ... should give you something like: + (env)brice@Brice:~/Projects/dev$ python run.py * Running on http://127.0.0.1:5000/ * Restarting with reloader