This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import imap | |
from collections import namedtuple | |
from django.db.models.query import QuerySet, ValuesQuerySet | |
class NamedTuplesQuerySet(ValuesQuerySet): | |
def iterator(self): | |
# Purge any extra columns that haven't been explicitly asked for | |
extra_names = self.query.extra_select.keys() |