Add db initialization

debrice 2012-02-05 20:00:43 -08:00
parent 7b41b43f11
commit 2dde04cb65

@ -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