Created
February 22, 2020 18:22
-
-
Save ychennay/67da9401caec49ceb4a8b32315c81175 to your computer and use it in GitHub Desktop.
Simple Flask Data Model for a Student
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask.ext.sqlalchemy import SQLAlchemy | |
db = SQLAlchemy() | |
class Student(db.Model): | |
student_id = db.Column(db.Integer, primary_key=True) | |
first_name = db.Column(db.String(80)) | |
last_name = db.Column(db.String(80)) | |
enrolled_school = db.Column(db.String(30)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment