Fixbug structure

This commit is contained in:
Andros Fenollosa
2017-05-11 18:31:59 +02:00
parent 3b431c6d0a
commit ce763d6493
4 changed files with 39 additions and 25 deletions

View File

@ -7,7 +7,11 @@ app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///book.sqlite'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
class Contacts(db.Model):
class Contact(db.Model):
__tablename__ = 'contacts'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(80), nullable=False)
surname = db.Column(db.String(100), nullable=True)