urls.py 622 B

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