Install and use djangorestframework

This commit is contained in:
2021-04-01 20:36:29 -05:00
parent 567226684d
commit da85e74860
11 changed files with 51 additions and 1 deletions

7
apiv1/models.py Normal file
View 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']