from django.urls import path from .views import (PredictionCreateView, PredictionListView, PredictionHistoryListView, PredictionHistoryDetailView, PredictionHistoryDeleteView, SessionView, WhoAmIView, SavedPointViewset, get_csrf, login_view, logout_view) from rest_framework.authtoken.views import obtain_auth_token from .views import TelemetryListCreateView urlpatterns = [ path('predictions', PredictionCreateView.as_view(), name='create_prediction'), path('predictions/list/', PredictionListView.as_view(), name='get_predictions'), path('token', obtain_auth_token, name = 'get_token'), path("history", PredictionHistoryListView.as_view(), name='view_history_list'), path("history//", PredictionHistoryDetailView.as_view(), name='view_history_detail'), path("history//delete/", PredictionHistoryDeleteView.as_view(), name='delete_history'), path("/telemetry/", TelemetryListCreateView.as_view(), name="create_telemetry"), path('saved-points/', SavedPointViewset.as_view({'get': 'list', 'post': 'create'}), name='saved_points'), path('saved-points//', SavedPointViewset.as_view({'get': 'retrieve', 'put': 'update', 'delete': 'destroy'}), name='saved_point_detail'), path('csrf/', get_csrf, name='api-csrf'), path('login/', login_view, name='api-login'), path('logout/', logout_view, name='api-logout'), path('session/', SessionView.as_view(), name='api-session'), # new path('whoami/', WhoAmIView.as_view(), name='api-whoami'), # new ]