1234567891011121314151617 |
- from django.urls import include, path
- from rest_framework import routers
- from suitablephones.views import BluetoothViewSet, CameraViewSet, DeviceViewSet, SingleDeviceViewSet, SearchDeviceViewSet
- router = routers.DefaultRouter(trailing_slash=False)
- router.register(r'search', SearchDeviceViewSet)
- router.register(r'device', SingleDeviceViewSet)
- router.register(r'devices', DeviceViewSet)
- router.register(r'bluetooth', BluetoothViewSet)
- router.register(r'camera', CameraViewSet)
- urlpatterns = [
- path('api/', include(router.urls)),
- path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
- ]
|