carom-server/billard/views.py

17 lines
540 B
Python
Raw Normal View History

2017-01-03 19:55:01 +01:00
from billard.models import Client, Location, Table
from billard.serializers import ClientSerializer, LocationSerializer, TableSerializer
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
class TableViewSet(viewsets.ModelViewSet):
queryset = Table.objects.all()
serializer_class = TableSerializer