urls.py 1.18 KB
Newer Older
1
from django.urls import path, include
asmundh's avatar
asmundh committed
2
from users import views
3
4
5
6
from rest_framework_simplejwt.views import (
    TokenObtainPairView,
    TokenRefreshView,
)
asmundh's avatar
asmundh committed
7
8
9
10
11

urlpatterns = [
    path("api/users/", views.UserList.as_view(), name="user-list"),
    path("api/users/<int:pk>/", views.UserDetail.as_view(), name="user-detail"),
    path("api/users/<str:username>/", views.UserDetail.as_view(), name="user-detail"),
Runar Sæther's avatar
Runar Sæther committed
12
    path("api/users/<str:username>/subscribers", views.UserSubscribers.as_view(), name="user-subscribers"),
asmundh's avatar
asmundh committed
13
14
15
16
17
18
19
20
21
22
    path("api/offers/", views.OfferList.as_view(), name="offer-list"),
    path("api/offers/<int:pk>/", views.OfferDetail.as_view(), name="offer-detail"),
    path(
        "api/athlete-files/", views.AthleteFileList.as_view(), name="athlete-file-list"
    ),
    path(
        "api/athlete-files/<int:pk>/",
        views.AthleteFileDetail.as_view(),
        name="athletefile-detail",
    ),
23
24
25
26
    path("api/auth/", include("rest_framework.urls")),
    path("api/token/", TokenObtainPairView.as_view(), name="token_obtain_pair"),
    path("api/token/refresh/", TokenRefreshView.as_view(), name="token_refresh"),
    path("api/remember_me/", views.RememberMe.as_view(), name="remember_me"),
asmundh's avatar
asmundh committed
27
]