Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_class(table_name, user_table_id, user_score):
- class GenericTable(db.Model):
- __tablename__ = table_name
- __table_args__ = {'extend_existing': True}
- id = db.Column(db.Integer, primary_key=True)
- stid = db.Column(db.Integer, unique=True)
- score = db.Column(db.Integer)
- def __init__(self, user_table_id, user_score):
- self.stid = user_table_id
- self.score = user_score
- obj = GenericTable(user_table_id, user_score)
- return obj
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement