2016-05-13 22:19:38 -05:00
|
|
|
"""Serializers for the karma objects."""
|
|
|
|
|
|
|
|
from rest_framework import serializers
|
|
|
|
|
|
|
|
from karma.models import KarmaKey
|
|
|
|
|
|
|
|
|
|
|
|
class KarmaKeySerializer(serializers.ModelSerializer):
|
2017-02-11 18:00:43 -06:00
|
|
|
"""Serializer for the REST API."""
|
2016-05-13 22:19:38 -05:00
|
|
|
|
|
|
|
class Meta:
|
2017-02-11 18:00:43 -06:00
|
|
|
"""Meta options."""
|
|
|
|
|
2016-05-13 22:19:38 -05:00
|
|
|
model = KarmaKey
|
|
|
|
fields = ('id', 'key', 'score', 'rank')
|