Skip to content

Instantly share code, notes, and snippets.

@bogsio
Created November 25, 2013 21:40
Show Gist options
  • Save bogsio/7649365 to your computer and use it in GitHub Desktop.
Save bogsio/7649365 to your computer and use it in GitHub Desktop.
from tastypie.resources import ModelResource
from .models import TodoList, TodoItem
class TodoListResource(ModelResource):
class Meta:
queryset = TodoList.objects.all()
resource_name = 'list'
class TodoItemResource(ModelResource):
class Meta:
queryset = TodoItem.objects.all()
resource_name = 'item'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment