Add db initialization
parent
7b41b43f11
commit
2dde04cb65
1 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue