From 882e17f27b221c27820350d254210cfb3fcd495e Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sat, 4 Feb 2017 08:57:50 -0600 Subject: [PATCH] Add id field. --- bikeshop_project/registration/serializers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bikeshop_project/registration/serializers.py b/bikeshop_project/registration/serializers.py index 8633795..e4623ce 100644 --- a/bikeshop_project/registration/serializers.py +++ b/bikeshop_project/registration/serializers.py @@ -1,5 +1,4 @@ from rest_framework import serializers -from rest_framework.serializers import ModelSerializer from .models import Member @@ -7,6 +6,7 @@ from .models import Member class MemberSerializer(serializers.HyperlinkedModelSerializer): class Meta: 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', - 'waiver', 'is_active', 'banned', 'suspended') \ No newline at end of file + 'waiver', 'is_active', 'banned', 'suspended') + id = serializers.ReadOnlyField() \ No newline at end of file