api-drf-1/api/urls.py

10 lines
485 B
Python

from django.urls import path
from .views import PredictionCreateView, PredictionListView, PredictionDeleteView
from rest_framework.authtoken.views import obtain_auth_token
urlpatterns = [
path('predictions', PredictionCreateView.as_view(), name='create_prediction'),
path('predictions', PredictionListView.as_view(), name='get_predictions'),
path('predictions/<uuid:pk>', PredictionDeleteView.as_view(), name='delete_prediction'),
path('token/', obtain_auth_token),
]