|
@ -1,5 +1,4 @@ |
|
|
from rest_framework import serializers |
|
|
from rest_framework import serializers |
|
|
from rest_framework.serializers import ModelSerializer |
|
|
|
|
|
|
|
|
|
|
|
from .models import Member |
|
|
from .models import Member |
|
|
|
|
|
|
|
@ -7,6 +6,7 @@ from .models import Member |
|
|
class MemberSerializer(serializers.HyperlinkedModelSerializer): |
|
|
class MemberSerializer(serializers.HyperlinkedModelSerializer): |
|
|
class Meta: |
|
|
class Meta: |
|
|
model = Member |
|
|
model = Member |
|
|
fields = ('email', 'email_consent', 'email_consent', 'first_name', 'last_name', 'preferred_name', |
|
|
fields = ('id', 'email', 'email_consent', 'email_consent', 'first_name', 'last_name', 'preferred_name', |
|
|
'date_of_birth', 'guardian_name', 'phone', 'street', 'city', 'province', 'country', 'post_code', |
|
|
'date_of_birth', 'guardian_name', 'phone', 'street', 'city', 'province', 'country', 'post_code', |
|
|
'waiver', 'is_active', 'banned', 'suspended') |
|
|
'waiver', 'is_active', 'banned', 'suspended') |
|
|
|
|
|
id = serializers.ReadOnlyField() |