Coverage for django_napse/api/exchanges/serializers/exchange_account_detail_serializer.py: 100%
10 statements
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-12 13:49 +0000
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-12 13:49 +0000
1from rest_framework import serializers
3from django_napse.api.spaces.serializers.space_serializers import SpaceSerializer
4from django_napse.core.models import ExchangeAccount
7class ExchangeAccountDetailSerializer(serializers.ModelSerializer):
8 exchange = serializers.CharField(source="exchange.name")
9 spaces = SpaceSerializer(many=True, read_only=True)
11 class Meta:
12 model = ExchangeAccount
13 fields = [
14 "uuid",
15 "exchange",
16 "name",
17 "testing",
18 "description",
19 "created_at",
20 "spaces",
21 ]
22 read_only_fields = [
23 "uuid",
24 "exchange",
25 "testing",
26 "created_at",
27 "spaces",
28 ]