Download Code/flask_project/pro_name/models.py from zxy0307/Python_05_Flask: direct link, hf CLI and curl.
- Browser
- Download file 384 Bytes
-
https://huggingface.co/zxy0307/Python_05_Flask/resolve/main/Code/flask_project/pro_name/models.py
- Command line
-
hf download hf://zxy0307/Python_05_Flask/Code/flask_project/pro_name/models.py
-
curl -L -o models.py https://huggingface.co/zxy0307/Python_05_Flask/resolve/main/Code/flask_project/pro_name/models.py
384 Bytes
| from pro_name import db | |
| # 创建模型类 | |
| class User(db.Model): | |
| __tablename__ = 't_user' | |
| id = db.Column(db.Integer,primary_key = True,autoincrement = True) | |
| name = db.Column(db.String(32)) | |
| pwd = db.Column(db.String(32)) | |
| age = db.Column(db.Integer) | |
| city = db.Column(db.String(32)) | |
| def __repr__(self): | |
| return f'<User id={self.id} name={self.name}>' |