Skip to content

Instantly share code, notes, and snippets.

@rabmarjan
Created April 2, 2018 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rabmarjan/d9f43a5db7a5181a06ca5cb3d0ad1ca5 to your computer and use it in GitHub Desktop.
Save rabmarjan/d9f43a5db7a5181a06ca5cb3d0ad1ca5 to your computer and use it in GitHub Desktop.
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