|
|
@ -27,7 +27,8 @@ class User(Base): |
|
|
|
stripe_customer = Column(String(256)) |
|
|
|
stripe_customer = Column(String(256)) |
|
|
|
|
|
|
|
|
|
|
|
def set_password(self, password): |
|
|
|
def set_password(self, password): |
|
|
|
self.password = bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt()).decode("utf-8") |
|
|
|
self.password = bcrypt.hashpw(password.encode("utf-8"), |
|
|
|
|
|
|
|
bcrypt.gensalt()).decode("utf-8") |
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, email, password): |
|
|
|
def __init__(self, email, password): |
|
|
|
self.email = email |
|
|
|
self.email = email |
|
|
@ -63,6 +64,7 @@ class Donation(Base): |
|
|
|
comment = Column(String(512)) |
|
|
|
comment = Column(String(512)) |
|
|
|
active = Column(Boolean) |
|
|
|
active = Column(Boolean) |
|
|
|
payments = Column(Integer) |
|
|
|
payments = Column(Integer) |
|
|
|
|
|
|
|
hidden = Column(Boolean, server_default='f', nullable=False) |
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, user, type, amount, project=None, comment=None): |
|
|
|
def __init__(self, user, type, amount, project=None, comment=None): |
|
|
|
self.user = user |
|
|
|
self.user = user |
|
|
|