Edited User parameters

This commit is contained in:
Wout Schellaert 2015-03-26 22:23:11 +01:00
parent b69132b5b7
commit c851ce11ec
2 changed files with 4 additions and 6 deletions

View file

@ -5,12 +5,11 @@ db.drop_all()
db.create_all() db.create_all()
feli = User() feli = User()
feli.configure("feliciaan", True, True) feli.configure("feliciaan", True, 0)
db.session.add(feli) db.session.add(feli)
don = User() wout = User()
don.configure("don", True, True) wout.configure('wout', True, 0)
db.session.add(don)
# To future developers, add yourself here # To future developers, add yourself here

View file

@ -9,9 +9,8 @@ class User(db.Model):
courrier = db.relationship('Courrier', backref='courrier', lazy='dynamic') courrier = db.relationship('Courrier', backref='courrier', lazy='dynamic')
logactions = db.relationship('LogAction', backref='user', lazy='dynamic') logactions = db.relationship('LogAction', backref='user', lazy='dynamic')
def configure(self, username, allowed, admin, bias): def configure(self, username, admin, bias):
self.username = username self.username = username
self.allowed = allowed
self.admin = admin self.admin = admin
self.bias = bias self.bias = bias