toolshed/backend/authentication/serializers.py
jedi d00d637dca
All checks were successful
continuous-integration/drone/push Build is passing
add /files/ and /item_files/ API endpoints
2023-07-07 19:31:50 +02:00

12 lines
316 B
Python

from rest_framework import serializers
from authentication.models import ToolshedUser
class OwnerSerializer(serializers.ReadOnlyField):
class Meta:
model = ToolshedUser
fields = ['username', 'domain']
def to_representation(self, value):
return value.username + '@' + value.domain