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

13
apiv1/urls.py Normal file
View File

@@ -0,0 +1,13 @@
from django.urls import include, path
from rest_framework import routers
from . import views
router = routers.DefaultRouter()
router.register(r'bookmarks', views.BookmarkViewSet)
# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
path('', include(router.urls)),
path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
]