from tastypie.resources import ModelResource
from my_app.models import MyModel
class MyModelResource(ModelResource):
class Meta:
queryset = MyModel.objects.all()
allowed_methods = ['get']
In your root URLconf, add the following code (around where the admin code might be):
from django.conf.urls import url, include
from tastypie.api import Api
from my_app.api.resources import MyModelResource
v1_api = Api(api_name='v1')
v1_api.register(MyModelResource())
urlpatterns = [
# ...more URLconf bits here...
# Then add:
url(r'^api/', include(v1_api.urls)),
]