Skip to content

Commit

Permalink
[Feat] export data as csv file
Browse files Browse the repository at this point in the history
  • Loading branch information
zakarm committed May 9, 2024
1 parent a35188d commit 004b800
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions app/back-end/dashboards/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ class Meta:
fields = ('user', 'is_accepted', 'blocked', 'is_user_from')

def get_user(self, obj):
print(obj.user_from.id, file=sys.stderr)
print(self.context['id'], file=sys.stderr)
if obj.user_from.id == self.context['id']:
user_data = User.objects.get(id=obj.user_to.id)
else:
Expand Down Expand Up @@ -112,8 +110,6 @@ def get_friends(self, obj):
friends_data = Friendship.objects.filter((Q(user_from = obj)| Q(user_to= obj)) &
Q(u_one_is_blocked_u_two = False) &
Q(u_two_is_blocked_u_one = False))

print(friends_data, file = sys.stderr)
serializer = FriendshipSerializer(friends_data, many=True, context = {'id': obj.id})
return serializer.data

Expand Down
2 changes: 0 additions & 2 deletions app/back-end/dashboards/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,3 @@ def post(self, request):
context = {"period": period}
serializer = self.serializer_class(instance=user, context=context)
return Response(serializer.data)


0 comments on commit 004b800

Please sign in to comment.