更新时间:2023-02-20 18:55:03
Employees.objects.values_list('eng_name', flat=True)
这将创建所有 eng_name s。如果您希望每行不止一个字段,则不能做一个平面列表:这将创建一个元组列表:
That creates a flat list of all eng_name
s. If you want more than one field per row, you can't do a flat list: this will create a list of tuples:
Employees.objects.values_list('eng_name', 'rank')