Add: furaffinity serializers.py
This commit is contained in:
parent
c28d4a72e1
commit
0284dac1b1
1 changed files with 14 additions and 0 deletions
14
archivist/sites/furaffinity/serializers.py
Normal file
14
archivist/sites/furaffinity/serializers.py
Normal 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']
|
Loading…
Reference in a new issue