Skip to content

Instantly share code, notes, and snippets.

@mauler
Created November 5, 2012 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauler/4019438 to your computer and use it in GitHub Desktop.
Save mauler/4019438 to your computer and use it in GitHub Desktop.
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