2022-11-23 11:41:43 +03:00
|
|
|
from django.urls import include, path
|
|
|
|
from rest_framework.authtoken.views import obtain_auth_token
|
|
|
|
|
2023-09-24 20:28:21 +03:00
|
|
|
from akarpov.users.api.views import GenerateUserJWTTokenAPIView, UserRegisterAPIViewSet
|
2022-11-23 11:41:43 +03:00
|
|
|
|
2023-08-01 04:08:11 +03:00
|
|
|
app_name = "api"
|
|
|
|
|
2022-11-23 11:41:43 +03:00
|
|
|
urlpatterns_v1 = [
|
|
|
|
path(
|
|
|
|
"auth/",
|
|
|
|
include(
|
|
|
|
[
|
|
|
|
path(
|
2023-09-10 17:38:47 +03:00
|
|
|
"register/",
|
|
|
|
UserRegisterAPIViewSet.as_view(),
|
|
|
|
name="user_register_api",
|
2022-11-23 11:41:43 +03:00
|
|
|
),
|
|
|
|
path("token/", obtain_auth_token),
|
2023-09-24 20:28:21 +03:00
|
|
|
path("jwt/", GenerateUserJWTTokenAPIView.as_view()),
|
2022-11-23 11:41:43 +03:00
|
|
|
]
|
|
|
|
),
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"users/",
|
2023-08-01 04:08:11 +03:00
|
|
|
include("akarpov.users.api.urls", namespace="users"),
|
|
|
|
),
|
2023-11-18 14:59:16 +03:00
|
|
|
path(
|
|
|
|
"gallery/",
|
|
|
|
include("akarpov.gallery.api.urls", namespace="gallery"),
|
|
|
|
),
|
2023-09-24 20:28:21 +03:00
|
|
|
path(
|
|
|
|
"notifications/",
|
|
|
|
include("akarpov.notifications.providers.urls", namespace="notifications"),
|
|
|
|
),
|
2023-08-01 04:08:11 +03:00
|
|
|
path(
|
|
|
|
"blog/",
|
|
|
|
include("akarpov.blog.api.urls", namespace="blog"),
|
2023-01-11 01:06:08 +03:00
|
|
|
),
|
2023-09-29 20:07:14 +03:00
|
|
|
path(
|
|
|
|
"music/",
|
|
|
|
include("akarpov.music.api.urls", namespace="music"),
|
|
|
|
),
|
2023-01-11 01:06:08 +03:00
|
|
|
path(
|
|
|
|
"tools/",
|
2023-08-01 04:08:11 +03:00
|
|
|
include(
|
|
|
|
"akarpov.tools.api.urls",
|
|
|
|
namespace="tools",
|
|
|
|
),
|
2022-11-23 11:41:43 +03:00
|
|
|
),
|
|
|
|
]
|
|
|
|
|
|
|
|
urlpatterns = [path("v1/", include(urlpatterns_v1))]
|