Created
June 7, 2011 23:28
-
-
Save jazztpt/1013439 to your computer and use it in GitHub Desktop.
Valentunes api auth
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
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) | |
class Meta: | |
queryset = Card.objects.all() | |
resource_name = 'card' | |
authentication = BasicAuthentication() | |
authorization = DjangoAuthorization() | |
serializer = Serializer() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment