feat: Add comprehensive Django user app with tests using model-bakery

- Implemented user authentication with JWT tokens
- Added user and profile models with OneToOne relationship
- Created service layer for business logic separation
- Implemented DRF serializers and views
- Added comprehensive test suite with model-bakery factories
- Fixed ipdb/pdbpp dependency conflicts with custom test runner
- Configured development and production environments
- Added deployment configurations for Apache, systemd, and Docker
This commit is contained in:
2026-01-19 14:12:33 +01:00
commit cbfbd8652d
51 changed files with 4183 additions and 0 deletions

22
src/apps/user/urls.py Normal file
View File

@@ -0,0 +1,22 @@
from django.urls import path
from rest_framework_simplejwt.views import TokenVerifyView
from . import views
urlpatterns = [
# Аутентификация
path('register/', views.RegisterView.as_view(), name='register'),
path('login/', views.LoginView.as_view(), name='login'),
path('logout/', views.LogoutView.as_view(), name='logout'),
path('token/refresh/', views.TokenRefreshView.as_view(), name='token_refresh'),
path('token/verify/', TokenVerifyView.as_view(), name='token_verify'),
# Пользовательские данные
path('me/', views.CurrentUserView.as_view(), name='current_user'),
path('me/update/', views.UserUpdateView.as_view(), name='user_update'),
path('profile/', views.ProfileDetailView.as_view(), name='profile_detail'),
path('profile/full/', views.user_profile_detail, name='profile_full'),
# Безопасность
path('password/change/', views.PasswordChangeView.as_view(), name='password_change'),
]