1👍
✅
If by efficiently you mean in a single query, then you can get both attributes in one call and use zip
to decompose them into separate lists:
values = Foo.objects.values_list('id', 'name')
id_list, name_list = zip(*values)
Source:stackexchange.com