validation for pos device - some changes in pos device models
This commit is contained in:
0
apps/pos_device/pos/api/v1/serializers/device.py
Normal file
0
apps/pos_device/pos/api/v1/serializers/device.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from django.urls import path, include
|
||||
from rest_framework.routers import DefaultRouter
|
||||
from .viewsets.device import TestViewSet
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register('test', TestViewSet, basename='test')
|
||||
|
||||
urlpatterns = [
|
||||
path('v1/', include(router.urls))
|
||||
]
|
||||
|
||||
8
apps/pos_device/pos/api/v1/viewsets/device.py
Normal file
8
apps/pos_device/pos/api/v1/viewsets/device.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from rest_framework import viewsets
|
||||
from rest_framework.response import Response
|
||||
|
||||
|
||||
class TestViewSet(viewsets.ModelViewSet):
|
||||
|
||||
def list(self, request, *args, **kwargs):
|
||||
return Response("Hello from the outsiiiiiiiiide") # noqa
|
||||
Reference in New Issue
Block a user