Skip to content

Instantly share code, notes, and snippets.

@jazztpt
Created June 7, 2011 23:33
Show Gist options
  • Save jazztpt/1013447 to your computer and use it in GitHub Desktop.
Save jazztpt/1013447 to your computer and use it in GitHub Desktop.
Valentunes api return only users cards
class CardResource(ModelResource):
track_set = fields.ToManyField(TrackResource, 'track_set', full=True)
def get_object_list(self, request, *args, **kwargs):
return Card.objects.filter(user=request.user)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment