gva/gnuviechadmin/help/serializers.py
Jan Dittberner 0f91587c60 Remove unneeded users API view
The help-users API view is sufficient
2023-04-16 13:50:01 +02:00

22 lines
488 B
Python

"""
Serializers for the REST API
"""
from rest_framework import serializers
from help.models import HelpUser
class HelpUserSerializer(serializers.HyperlinkedModelSerializer):
user = serializers.StringRelatedField()
class Meta:
model = HelpUser
fields = [
"url",
"user",
"email_address",
"postal_address",
"offline_account_code",
]
read_only_fields = ["user", "offline_account_code"]