initial commit
This commit is contained in:
commit
c6961c03c3
33 changed files with 1782 additions and 0 deletions
48
stratoflights_api/urls.py
Normal file
48
stratoflights_api/urls.py
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
from django.urls import path
|
||||
from rest_framework.routers import DefaultRouter
|
||||
from rest_framework.authtoken.views import obtain_auth_token
|
||||
from .views import (
|
||||
PredictionViewSet,
|
||||
SavedPointViewset,
|
||||
PreditctionTemplateViewset,
|
||||
TelemetryListCreateView,
|
||||
get_csrf,
|
||||
login_view,
|
||||
logout_view,
|
||||
SessionView,
|
||||
WhoAmIView,
|
||||
UserProfileView,
|
||||
ChangePasswordView,
|
||||
TokenManagementView,
|
||||
DeleteUserDataView,
|
||||
DeleteAccountView
|
||||
)
|
||||
|
||||
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register(r'predictions', PredictionViewSet, basename='predictions')
|
||||
router.register(r'saved-points', SavedPointViewset, basename='saved-points')
|
||||
router.register(r'saved-templates', PreditctionTemplateViewset, basename='saved-templates')
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path("csrf/", get_csrf, name='api-csrf'),
|
||||
path('token', obtain_auth_token, name = 'get_token'),
|
||||
path("login/", login_view, name='api-login'),
|
||||
path("logout/", logout_view, name='api-logout'),
|
||||
path("session/", SessionView.as_view(), name='api-session'),
|
||||
path("whoami/", WhoAmIView.as_view(), name='api-whoami'),
|
||||
path("<uuid:pk>/telemetry/", TelemetryListCreateView.as_view(), name="create_telemetry"),
|
||||
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'),
|
||||
path('whoami/', WhoAmIView.as_view(), name='api-whoami'),
|
||||
path("profile/", UserProfileView.as_view(), name='api-profile'),
|
||||
path("profile/change-password/", ChangePasswordView.as_view(), name='api-change-password'),
|
||||
path("profile/token/", TokenManagementView.as_view(), name='api-token'),
|
||||
path("profile/delete-data/", DeleteUserDataView.as_view(), name='api-delete-data'),
|
||||
path("profile/delete-account/", DeleteAccountView.as_view(), name='api-delete-account'),
|
||||
]
|
||||
urlpatterns += router.urls
|
||||
Loading…
Add table
Add a link
Reference in a new issue