forked from uncloud/uncloud
a5695ffa48
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
16 lines
437 B
Python
16 lines
437 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']
|