carom-server/billard/views.py

23 lines
588 B
Python
Raw Normal View History

2017-01-06 19:11:29 +01:00
from billard.serializers import *
2017-01-03 19:55:01 +01:00
from rest_framework import viewsets
2017-01-03 19:26:51 +01:00
2017-01-03 19:55:01 +01:00
class ClientViewSet(viewsets.ModelViewSet):
queryset = Client.objects.all()
serializer_class = ClientSerializer
class LocationViewSet(viewsets.ModelViewSet):
queryset = Location.objects.all()
serializer_class = LocationSerializer
2017-01-06 18:59:58 +01:00
2017-01-03 19:55:01 +01:00
class TableViewSet(viewsets.ModelViewSet):
queryset = Table.objects.all()
2017-01-06 18:59:58 +01:00
serializer_class = TableSerializer
2017-01-06 19:11:29 +01:00
class TmpLocationDataViewSet(viewsets.ModelViewSet):
queryset = TmpLocationData.objects.all()
serializer_class = TmpLocationDataSerializer