Sith/api/views/serializers.py
2016-08-07 20:45:06 +02:00

12 lines
260 B
Python

from rest_framework import serializers
from counter.models import Counter
class Counter(serializers.ModelSerializer):
is_open = serializers.BooleanField(read_only=True)
class Meta:
model = Counter
fields = ('id', 'name', 'is_open')