print ip in user relation api

This commit is contained in:
2025-10-27 12:58:25 +03:30
parent 7571ccf58c
commit bb9f8a645e
3 changed files with 5 additions and 2 deletions

View File

@@ -160,8 +160,6 @@ class UserViewSet(SoftDeleteMixin, ModelViewSet):
serializer = authorize_view.UserRelationSerializer( serializer = authorize_view.UserRelationSerializer(
authorize_view.UserRelations.objects.get(user=request.user) authorize_view.UserRelations.objects.get(user=request.user)
) )
print(request.META.get('HTTP_X_FORWARDED_FOR'))
print(request.META.get('REMOTE_ADDR'))
return Response(serializer.data, status.HTTP_200_OK) return Response(serializer.data, status.HTTP_200_OK)

View File

@@ -153,4 +153,7 @@ class UserRelationViewSet(BaseViewSet, SoftDeleteMixin, viewsets.ModelViewSet, D
return self.get_paginated_response(serializer.data) return self.get_paginated_response(serializer.data)
serializer = self.get_serializer(queryset, many=True) serializer = self.get_serializer(queryset, many=True)
print(request.META.get('HTTP_X_FORWARDED_FOR'))
print(request.META.get('REMOTE_ADDR'))
return Response(serializer.data) return Response(serializer.data)

View File

@@ -9,3 +9,5 @@
[2025-10-27 12:47:00,940] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\api.py changed, reloading. [2025-10-27 12:47:00,940] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\api.py changed, reloading.
[2025-10-27 12:47:03,704] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader [2025-10-27 12:47:03,704] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
[2025-10-27 12:51:33,606] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\api.py changed, reloading. [2025-10-27 12:51:33,606] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\api.py changed, reloading.
[2025-10-27 12:51:36,841] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
[2025-10-27 12:58:13,543] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\api.py changed, reloading.