Created
October 29, 2018 15:24
-
-
Save Kotauror/294fbf96f201ad95a8a2dff23c9922ea to your computer and use it in GitHub Desktop.
models.py
This file contains hidden or 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_sqlalchemy import SQLAlchemy | |
db = SQLAlchemy() | |
class Contact(db.Model): | |
id = db.Column(db.Integer, primary_key=True) | |
name = db.Column(db.String(80), unique=True) | |
def __init__(self, name): | |
self.name = name | |
def __repr__(self): | |
return '<Contact %r>' % self.name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment