Complete the code to import the SQLAlchemy class from flask_sqlalchemy.
from flask_sqlalchemy import [1]
The SQLAlchemy class is imported from flask_sqlalchemy to set up the database connection.
Complete the code to create a Flask app instance.
app = [1](__name__)Flask() creates the app instance needed to run the web application.
Fix the error in the code to initialize the SQLAlchemy object with the Flask app.
db = SQLAlchemy([1])The SQLAlchemy object needs the Flask app instance to connect the database properly.
Fill both blanks to configure the database URI and enable track modifications.
app.config['SQLALCHEMY_DATABASE_URI'] = [1] app.config[[2]] = False
The database URI tells SQLAlchemy where the database is. The track modifications setting is usually turned off to save resources.
Fill all three blanks to define a simple User model with id, username, and email fields.
class User(db.Model): id = db.Column(db.Integer, primary_key=[1]) username = db.Column(db.String(80), unique=[2], nullable=False) email = db.Column(db.String(120), unique=[3], nullable=False)
The id is the primary key so primary_key=True. The username and email should be unique, so unique=True.