forked from uncloud/uncloud
94633d6cc8
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
19 lines
499 B
Python
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
|