2022-10-08 00:48:53 +03:00
|
|
|
from django.urls import path, include
|
|
|
|
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
|
|
|
|
|
2022-10-08 19:33:58 +03:00
|
|
|
from events.api.views import ListCreateEventApi, RetireUpdateDeleteEventApi
|
2022-10-08 11:21:53 +03:00
|
|
|
from marketplace.api.views import ListCreateProductApi, RetireUpdateDestroyProductApi
|
2022-10-08 16:02:57 +03:00
|
|
|
from users.api.views import (
|
|
|
|
ListCreateUserApi,
|
|
|
|
RetireUpdateDeleteUserApi,
|
|
|
|
ListCreateDepartmentApi,
|
|
|
|
RetireUpdateDeleteDepartmentApi,
|
|
|
|
ListCreateStreamApi,
|
|
|
|
RetireUpdateDeleteStreamApi,
|
|
|
|
ListCreateCommandApi,
|
|
|
|
RetireUpdateDeleteCommandApi,
|
2022-10-08 19:33:58 +03:00
|
|
|
CreateSeasonApi,
|
2022-10-08 16:02:57 +03:00
|
|
|
)
|
2022-10-08 11:21:53 +03:00
|
|
|
|
2022-10-08 00:48:53 +03:00
|
|
|
urlpatterns = [
|
|
|
|
path(
|
|
|
|
"auth/",
|
|
|
|
include(
|
|
|
|
[
|
|
|
|
path("token/", TokenObtainPairView.as_view(), name="token_obtain_pair"),
|
|
|
|
path("refresh/", TokenRefreshView.as_view(), name="token_refresh"),
|
|
|
|
]
|
|
|
|
),
|
|
|
|
),
|
2022-10-08 19:31:01 +03:00
|
|
|
path(
|
|
|
|
"events/",
|
|
|
|
include(
|
|
|
|
[
|
|
|
|
path("", ListCreateEventApi.as_view(), name="list_create_event"),
|
|
|
|
path(
|
|
|
|
"<str:slug>",
|
|
|
|
RetireUpdateDeleteEventApi.as_view(),
|
|
|
|
name="get_update_delete_event",
|
|
|
|
),
|
|
|
|
]
|
|
|
|
),
|
|
|
|
),
|
2022-10-08 00:48:53 +03:00
|
|
|
path(
|
2022-10-08 11:21:53 +03:00
|
|
|
"marketplace/",
|
2022-10-08 00:48:53 +03:00
|
|
|
include(
|
|
|
|
[
|
2022-10-08 11:21:53 +03:00
|
|
|
path(
|
|
|
|
"product/",
|
|
|
|
ListCreateProductApi.as_view(),
|
|
|
|
name="list_create_product",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"product/<str:slug>",
|
|
|
|
RetireUpdateDestroyProductApi.as_view(),
|
|
|
|
name="get_update_destroy_product",
|
|
|
|
),
|
2022-10-08 00:48:53 +03:00
|
|
|
]
|
|
|
|
),
|
|
|
|
),
|
2022-10-08 13:52:49 +03:00
|
|
|
path(
|
|
|
|
"users/",
|
|
|
|
include(
|
|
|
|
[
|
2022-10-08 16:02:57 +03:00
|
|
|
path("", ListCreateUserApi.as_view(), name="list_create_user"),
|
|
|
|
path(
|
|
|
|
"<str:username>",
|
|
|
|
RetireUpdateDeleteUserApi.as_view(),
|
|
|
|
name="get_update_delete_user",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"department/",
|
|
|
|
ListCreateDepartmentApi.as_view(),
|
|
|
|
name="list_create_department",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"department/",
|
|
|
|
ListCreateDepartmentApi.as_view(),
|
|
|
|
name="list_create_department",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"department/<int:pk>",
|
|
|
|
RetireUpdateDeleteDepartmentApi.as_view(),
|
|
|
|
name="get_update_delete_department",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"stream/",
|
|
|
|
ListCreateStreamApi.as_view(),
|
|
|
|
name="list_create_stream",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"stream/<int:pk>",
|
|
|
|
RetireUpdateDeleteStreamApi.as_view(),
|
|
|
|
name="get_update_delete_stream",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"command/",
|
|
|
|
ListCreateCommandApi.as_view(),
|
|
|
|
name="list_create_command",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"command/<int:pk>",
|
|
|
|
RetireUpdateDeleteCommandApi.as_view(),
|
|
|
|
name="get_update_delete_command",
|
|
|
|
),
|
2022-10-08 13:52:49 +03:00
|
|
|
]
|
|
|
|
),
|
|
|
|
),
|
2022-10-08 17:14:19 +03:00
|
|
|
path(
|
2022-10-08 19:57:46 +03:00
|
|
|
"season/",
|
2022-10-08 19:33:58 +03:00
|
|
|
include([path("", CreateSeasonApi.as_view(), name="create new season")]),
|
|
|
|
),
|
2022-10-08 00:48:53 +03:00
|
|
|
]
|