Skip to content

Instantly share code, notes, and snippets.

@aballah-chamakh
Created July 15, 2019 18:34
Show Gist options
  • Select an option

  • Save aballah-chamakh/e33ca40e202bbd835156824a3e4460ee to your computer and use it in GitHub Desktop.

Select an option

Save aballah-chamakh/e33ca40e202bbd835156824a3e4460ee to your computer and use it in GitHub Desktop.
from rest_framework import serializers
from .models import Door
class DoorSerializer(serializers.ModelSerializer):
class Meta :
model = Door
fields = ['id','name','opened']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment