Skip to content

Instantly share code, notes, and snippets.

@natea
Created June 7, 2011 21:07
Show Gist options
  • Save natea/1013170 to your computer and use it in GitHub Desktop.
Save natea/1013170 to your computer and use it in GitHub Desktop.
valentunes api.py (basic)
from tastypie.resources import ModelResource
from valentunes.models import Card, Track
class TrackResource(ModelResource):
class Meta:
queryset = Track.objects.all()
resource_name = 'track'
class CardResource(ModelResource):
class Meta:
queryset = Card.objects.all()
resource_name = 'card'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment