2020-02-21 10:43:17 +00:00
|
|
|
from django.contrib.auth.models import Group
|
|
|
|
from django.contrib.auth import get_user_model
|
|
|
|
|
2020-02-20 17:58:07 +00:00
|
|
|
from rest_framework import serializers
|
|
|
|
|
|
|
|
|
|
|
|
class UserSerializer(serializers.HyperlinkedModelSerializer):
|
|
|
|
class Meta:
|
2020-02-21 10:43:17 +00:00
|
|
|
model = get_user_model()
|
2020-02-20 17:58:07 +00:00
|
|
|
fields = ['url', 'username', 'email', 'groups']
|
|
|
|
|
|
|
|
|
|
|
|
class GroupSerializer(serializers.HyperlinkedModelSerializer):
|
|
|
|
class Meta:
|
|
|
|
model = Group
|
|
|
|
fields = ['url', 'name']
|
2020-02-21 23:22:42 +00:00
|
|
|
|
|
|
|
class VMSnapshotSerializer(serializers.Serializer):
|
|
|
|
pass
|