Created
August 18, 2017 07:22
-
-
Save hassanabidpk/d22f6702c51ee4290e8aeeefd4e23ee1 to your computer and use it in GitHub Desktop.
Pycon Lunch serializer
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 rest_framework import serializers | |
from food.models import Restaurant | |
class RestaurantSerializer(serializers.ModelSerializer): | |
class Meta: | |
model = Restaurant | |
fields = ('id', 'name', 'address', 'photo', 'tags', 'menu', 'pub_date') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment