|
|
@ -4,10 +4,9 @@ from rest_framework.serializers import ModelSerializer |
|
|
|
from .models import Member |
|
|
|
|
|
|
|
|
|
|
|
class MemberSerializer(ModelSerializer): |
|
|
|
first_name = serializers.CharField(allow_blank=True, required=False) |
|
|
|
last_name = serializers.CharField(allow_blank=True, required=False) |
|
|
|
|
|
|
|
class MemberSerializer(serializers.HyperlinkedModelSerializer): |
|
|
|
class Meta: |
|
|
|
model = Member |
|
|
|
fields = ('first_name', 'last_name', 'email', 'id', 'banned', 'suspended') |
|
|
|
fields = ('email', 'email_consent', 'email_consent', 'first_name', 'last_name', 'preferred_name', |
|
|
|
'date_of_birth', 'guardian_name', 'phone', 'street', 'city', 'province', 'country', 'post_code', |
|
|
|
'waiver', 'is_active', 'banned', 'suspended') |