Flask 获取到Model 数据对象如何遍历打印所有键值对?
Flask 获取到Model 数据对象如何遍历打印所有键值对
user = current_user print('@@============================@@') for key, value in user.__dict__.items(): print(f"{key}: {value}") print('@@----------------------------@@')
Flask 获取到Model 数据对象如何遍历打印所有键值对
user = current_user print('@@============================@@') for key, value in user.__dict__.items(): print(f"{key}: {value}") print('@@----------------------------@@')