sqlalchemy flask tutorial code example
Example 1: sqlalchemy flask query
>>> from yourapplication import User
>>> admin = User(username='admin', email='[email protected]')
>>> guest = User(username='guest', email='[email protected]')
Example 2: db create all
I kept having an error when I was building the db following the tutorial from codecamp;. To fix it instead of creating the db (db.create_all) in the Command Prompt inside the env
I created it inside the program, so inside the app code i wrote db.create_all()