carom-server/billard/serializers.py

16 lines
423 B
Python

from rest_framework import serializers
from billard.models import LocationData, Client
class LocationDataSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = LocationData
fields = ('client_id', 'desk_no', 'tst', 'on_off',)
class ClientUpdateLastSeenSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Client
fields = ('uuid', 'last_seen')