uncloud-mravi/nicohack202002/uncloud/uncloud_api/serializers.py
2020-02-22 07:32:52 +01:00

19 lines
499 B
Python

from django.contrib.auth.models import Group
from django.contrib.auth import get_user_model
from rest_framework import serializers
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = get_user_model()
fields = ['url', 'username', 'email', 'groups']
class GroupSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Group
fields = ['url', 'name']
class VMSnapshotSerializer(serializers.Serializer):
pass