Created
April 16, 2016 09:06
-
-
Save hassanabidpk/e7cce7d11135d9959d2493bd40f794fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User, Group | |
from rest_framework import serializers | |
from .models import Location,Restaurant | |
class UserSerializer(serializers.HyperlinkedModelSerializer): | |
class Meta: | |
model = User | |
fields = ('url', 'username', 'email', 'groups') | |
class RestaurantSerializer(serializers.ModelSerializer): | |
class Meta: | |
model = Restaurant | |
fields = ('name','latitude','longitude','address','photo_url','phone_number','venue_id', | |
'checkins','r_type','created_at','updated_at') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment