routers from apps.documents.models import Document # ViewSets define the view behavior. class DocumentViewSet(viewsets.ModelViewSet): model = Document # Routers provide an easy way of automatically determining the URL conf router = routers.DefaultRouter() router.register(r'documents', DocumentViewSet) urlpatterns = patterns('', url(r'^', include(router.urls)) )