Skip to main content
Employees.objects.values_list('eng_name', flat=True) 

That creates a flat list of all eng_names. If you want more than one field per row, you can't do a flat list: this will create a list of liststuples:

Employees.objects.values_list('eng_name', 'rank') 
Employees.objects.values_list('eng_name', flat=True) 

That creates a flat list of all eng_names. If you want more than one field per row, you can't do a flat list: this will create a list of lists:

Employees.objects.values_list('eng_name', 'rank') 
Employees.objects.values_list('eng_name', flat=True) 

That creates a flat list of all eng_names. 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') 
added 208 characters in body
Source Link
Daniel Roseman
  • 601.8k
  • 68
  • 911
  • 924
Employees.objects.values_list('eng_name', flat=True) 

That creates a flat list of all eng_names. If you want more than one field per row, you can't do a flat list: this will create a list of lists:

Employees.objects.values_list('eng_name', 'rank') 
Employees.objects.values_list('eng_name', flat=True) 
Employees.objects.values_list('eng_name', flat=True) 

That creates a flat list of all eng_names. If you want more than one field per row, you can't do a flat list: this will create a list of lists:

Employees.objects.values_list('eng_name', 'rank') 
Source Link
Daniel Roseman
  • 601.8k
  • 68
  • 911
  • 924

Employees.objects.values_list('eng_name', flat=True)