from wuxi

[code] class User(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) username = db.Column(db.String(200), nullable=True)

def __repr__(self):
    return self.username

def save(self):
    db.session.add(self)
    db.session.commit()
    return self

[/code]

talk is cheap, show me code

tags: