QuerySet Results as namedtuple (Django 2.0+)

I’m a big fan of namedtuples and apparently starting Django 2.0 so is the ORM.

In Django 2.0 a new attribute was added to values_list called named. Setting named to true will return the queryset as a list of namedtuples:

>>> user.objects.values_list(
('Haki', 'Benita')

>>> user_names = User.objects.values_list(

>>> user_names[0]
Row(first_name='Haki', last_name='Benita')

>>> user_names[0].first_name

>>> user_names[0].last_name