July 2017
Beginner to intermediate
340 pages
7h 43m
English
In a Flask application based on SQLAlchemy, the model is described through classes, which represent the database schema.
For Runnerly, the database tables are:
Using the Flask-SQLAlchemy (http://flask-sqlalchemy.pocoo.org/) extension, you can specify the tables using the Model class as a base class. The following is the definition for the User table with the SQLAlchemy class:
from flask_sqlalchemy import SQLAlchemy ...