Skip to content

Instantly share code, notes, and snippets.

@cansadadeserfeliz
Last active August 29, 2015 13:57
Show Gist options
  • Save cansadadeserfeliz/9671809 to your computer and use it in GitHub Desktop.
Save cansadadeserfeliz/9671809 to your computer and use it in GitHub Desktop.
Filter values list
>>> Airport.objects.filter(
iata_code='DME',
).values_list(
'iata_code',
'city__name',
'city__country__name',
)
[(u'DME', u'Moscow', u'Russia')]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment