urls.py 464 B

123456789101112131415
  1. from django.urls import include, path
  2. from rest_framework import routers
  3. from suitablephones.views import BluetoothViewSet, CameraViewSet, DeviceViewSet
  4. router = routers.DefaultRouter()
  5. router.register(r'devices', DeviceViewSet)
  6. router.register(r'bluetooth', BluetoothViewSet)
  7. router.register(r'camera', CameraViewSet)
  8. urlpatterns = [
  9. path('api/', include(router.urls)),
  10. path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
  11. ]