Skip to content

Instantly share code, notes, and snippets.

@mauler
Created Nov 5, 2012
Embed
What would you like to do?
Hotel, preços
class HotelResource(ModelResource):
fields = ("pk", "name", "precos", )
model = Hotel
def precos(self, instance):
return Preco.objects.filter(quarto__hotel=instance)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment