Fix multiuser

This commit is contained in:
Andros Fenollosa
2016-09-18 13:03:57 +02:00
parent 5dbd6017f3
commit 75c2873ff3
3 changed files with 12 additions and 7 deletions

View File

@@ -23,10 +23,12 @@ class Note(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(100), unique=True)
text = db.Column(db.Text())
user_id = db.Column(db.Integer)
def __init__(self, title, text):
def __init__(self, title, text, user_id):
self.title = title
self.text = text
self.user_id = user_id
def __repr__(self):
return '<Note {title}>'.format(title=self.title)