Обновление в БД
This commit is contained in:
1 parent
bc26a6a50d
commit
643d14c35d
4 files changed
+19
-5
No files matched your search
+8
-3
@@ -23,9 +23,14 @@ class UserCommentAPI(ListCreateAPIView):
|
||||
def perform_create(self, serializer):
|
||||
serializer.save(user_id=self.request.user.id, comment=self.request.data['comment']) # updated after feedback
|
||||
|
||||
# class UserCommentUpdateAPI(UpdateAPIView):
|
||||
# queryset = UserComment.objects.all()
|
||||
# serializer_class = UserCommentSerializer
|
||||
class UserCommentUpdateAPI(RetrieveUpdateDestroyAPIView):
|
||||
queryset = UserComment.objects.all()
|
||||
serializer_class = UserCommentSerializer
|
||||
print('--------------------updatellllllllllllllll')
|
||||
|
||||
# def perform_update(self, serializer):
|
||||
# print('--------------------update')
|
||||
# serializer.save(comment=self.request.data['comment'])
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user