Add: furaffinity serializers.py

This commit is contained in:
Aroy-Art 2023-10-21 18:03:35 +02:00
parent c28d4a72e1
commit 0284dac1b1
Signed by: Aroy
GPG key ID: DB9689E9391DD156

View file

@ -0,0 +1,14 @@
from django.contrib.auth.models import User, Group
from rest_framework import serializers
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ['url', 'username', 'email', 'groups']
class GroupSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Group
fields = ['url', 'name']