Install and use djangorestframework
This commit is contained in:
7
apiv1/models.py
Normal file
7
apiv1/models.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from rest_framework import serializers
|
||||
from bookmarks.models import Bookmark
|
||||
|
||||
class BookmarkSerializer(serializers.HyperlinkedModelSerializer):
|
||||
class Meta:
|
||||
model = Bookmark
|
||||
fields = ['title', 'url']
|
||||
Reference in New Issue
Block a user