Skip to content

Instantly share code, notes, and snippets.

@rabmarjan
Created Apr 2, 2018
Embed
What would you like to do?
from contact.models import Contact
from rest_framework import serializers
class ContactSerializer(serializers.ModelSerializer):
"""Serializes an Address object"""
class Meta:
model = Contact
fields = ("contact_id", "first_name", "last_name", "middle_name", "email", "country", "phone", "address")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment