This commit is contained in:
2025-10-02 00:54:34 +02:00
commit 84b34c9615
200 changed files with 42048 additions and 0 deletions

28
backend/account/urls.py Normal file
View File

@@ -0,0 +1,28 @@
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import *
router = DefaultRouter()
router.register(r'users', UserView, basename='user') # change URL to plural users ?
urlpatterns = [
path('', include(router.urls)), # automaticky přidá všechny cesty z viewsetu
path("user/me/", CurrentUserView.as_view(), name="user-me"), # get current user data
path('token/', CookieTokenObtainPairView.as_view(), name='token_obtain_pair'), #přihlášení (get token)
path('token/refresh/', CookieTokenRefreshView.as_view(), name='token_refresh'), #refresh token
#potom co access token vyprší tak se pomocí refresh tokenu získa další
path('logout/', LogoutView.as_view(), name='logout'), # odhlášení (smaže tokeny)
path('registration/', UserRegistrationViewSet.as_view({'post': 'create'}), name='create_seller'),
#slouží čistě pro email
path("registration/verify-email/<uidb64>/<token>/", EmailVerificationView.as_view(), name="verify-email"),
path("registration/activation-varsymbol/", UserActivationViewSet.as_view(), name="activate_user_and_input_var_symbol"),
path("reset-password/", PasswordResetRequestView.as_view(), name="reset-password-request"),
path("reset-password/<uidb64>/<token>/", PasswordResetConfirmView.as_view(), name="reset-password-confirm"),
]