Sith/api/views/serializers.py

12 lines
260 B
Python
Raw Normal View History

2016-08-04 22:50:48 +00:00
from rest_framework import serializers
2016-08-05 18:01:23 +00:00
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')