add: profiles.all()
This commit is contained in:
@ -22,6 +22,12 @@ class ProfileViewSet(viewsets.ModelViewSet):
|
||||
return Response(self.serializer_class(instance).data,
|
||||
status=status.HTTP_200_OK)
|
||||
|
||||
def get_queryset(self):
|
||||
profiles = ProfileModel.objects.all()
|
||||
for profile in profiles:
|
||||
profile.avatar_url.name = profile.avatar_url.name.replace("profiles", "", 1)
|
||||
return profiles
|
||||
|
||||
def perform_create(self, serializer):
|
||||
serializer.save(user=self.request.user)
|
||||
|
||||
|
Reference in New Issue
Block a user