23 lines
532 B
Python
23 lines
532 B
Python
|
from figurines.models import Figurine
|
||
|
from figurines.models import Set
|
||
|
from rest_framework import serializers
|
||
|
|
||
|
|
||
|
class SetSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Set
|
||
|
fields = ('name', 'shortname')
|
||
|
|
||
|
|
||
|
class FigurineSerializer(serializers.HyperlinkedModelSerializer):
|
||
|
class Meta:
|
||
|
model = Figurine
|
||
|
fields = (
|
||
|
'collection',
|
||
|
'name',
|
||
|
'kind',
|
||
|
'achievement',
|
||
|
'achievement_max',
|
||
|
'coins',
|
||
|
'wish', )
|