Skip to content

Commit

Permalink
serialzer added
Browse files Browse the repository at this point in the history
  • Loading branch information
ameek committed Aug 1, 2018
1 parent 6152fff commit 5a02f82
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Binary file modified medicine_reminder/api/__pycache__/models.cpython-36.pyc
Binary file not shown.
10 changes: 10 additions & 0 deletions medicine_reminder/api/serializers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from rest_framework import serializers
from .models import Bucketlist

class BucketlistSerializer(serializers.ModelSerializer):
"""Serializer to map the Model instance into JSON format."""
class Meta:
"""this meta clss will map serializer's feilds with the model feilds"""
model = Bucketlist
feilds = ('id','name','date_created','date_modified')
read_only_feilds = ('date_created', 'date_modified')

0 comments on commit 5a02f82

Please sign in to comment.