urls.py 461 B

12345678910111213141516
  1. from __future__ import print_function, unicode_literals
  2. from django.conf.urls import patterns, url, include
  3. from rest_framework_bulk.routes import BulkRouter
  4. from .views import SimpleViewSet, UniqueTogetherViewSet
  5. router = BulkRouter()
  6. router.register('simple', SimpleViewSet, 'simple')
  7. router.register('unique-together', UniqueTogetherViewSet, 'unique-together')
  8. urlpatterns = patterns(
  9. '',
  10. url(r'^api/', include(router.urls, namespace='api')),
  11. )