added api/history

This commit is contained in:
afanasyev.aa 2025-04-05 20:50:54 +09:00
parent 2aef4d4756
commit cc5187c3a1
15 changed files with 109 additions and 17 deletions

View file

@ -1,5 +1,8 @@
from django.urls import path
from .views import PredictionCreateView, PredictionListView, PredictionDeleteView
from .views import (PredictionCreateView, PredictionListView, PredictionDeleteView,
PredictionHistoryListView,
PredictionHistoryDetailView,
PredictionHistoryDeleteView,)
from rest_framework.authtoken.views import obtain_auth_token
urlpatterns = [
@ -7,4 +10,7 @@ urlpatterns = [
path('predictions', PredictionListView.as_view(), name='get_predictions'),
path('predictions/<uuid:pk>', PredictionDeleteView.as_view(), name='delete_prediction'),
path('token/', obtain_auth_token),
path("history/", PredictionHistoryListView.as_view()),
path("history/<uuid:pk>/", PredictionHistoryDetailView.as_view()),
path("history/<uuid:pk>/delete/", PredictionHistoryDeleteView.as_view()),
]