prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Include Example number in the Project Comments view
  Feature description
  ---------
  On the backend API and in the dataset annotation interface, the Comments are associated with specific Examples. But in the Project Comments view, the Example association is unclear--all the comments are grouped together.
  
  Can the Project Comments view tab be improved to detail Examples, maybe even sort or group by Example?
  
  Thanks!
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `backend/examples/views/comment.py`
  Content:
  ```
  1 from django_filters.rest_framework import DjangoFilterBackend
  2 from rest_framework import filters, generics, status
  3 from rest_framework.permissions import IsAuthenticated
  4 from rest_framework.response import Response
  5 
  6 from examples.models import Comment
  7 from examples.permissions import IsOwnComment
  8 from examples.serializers import CommentSerializer
  9 from projects.permissions import IsProjectMember
  10 
  11 
  12 class CommentList(generics.ListCreateAPIView):
  13     permission_classes = [IsAuthenticated & IsProjectMember]
  14     serializer_class = CommentSerializer
  15     filter_backends = (DjangoFilterBackend, filters.SearchFilter)
  16     filterset_fields = ["example"]
  17     search_fields = ("text",)
  18 
  19     def get_queryset(self):
  20         queryset = Comment.objects.filter(example__project_id=self.kwargs["project_id"])
  21         return queryset
  22 
  23     def perform_create(self, serializer):
  24         serializer.save(example_id=self.request.query_params.get("example"), user=self.request.user)
  25 
  26     def delete(self, request, *args, **kwargs):
  27         delete_ids = request.data["ids"]
  28         Comment.objects.filter(user=request.user, pk__in=delete_ids).delete()
  29         return Response(status=status.HTTP_204_NO_CONTENT)
  30 
  31 
  32 class CommentDetail(generics.RetrieveUpdateDestroyAPIView):
  33     queryset = Comment.objects.all()
  34     serializer_class = CommentSerializer
  35     lookup_url_kwarg = "comment_id"
  36     permission_classes = [IsAuthenticated & IsProjectMember & IsOwnComment]
  37
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/backend/examples/views/comment.py b/backend/examples/views/comment.py
  --- a/backend/examples/views/comment.py
  +++ b/backend/examples/views/comment.py
  @@ -12,9 +12,10 @@
   class CommentList(generics.ListCreateAPIView):
       permission_classes = [IsAuthenticated & IsProjectMember]
       serializer_class = CommentSerializer
  -    filter_backends = (DjangoFilterBackend, filters.SearchFilter)
  +    filter_backends = (DjangoFilterBackend, filters.SearchFilter, filters.OrderingFilter)
       filterset_fields = ["example"]
       search_fields = ("text",)
  +    ordering_fields = ("created_at", "example")
   
       def get_queryset(self):
           queryset = Comment.objects.filter(example__project_id=self.kwargs["project_id"])
  
verification_info: {"golden_diff": "diff --git a/backend/examples/views/comment.py b/backend/examples/views/comment.py\n--- a/backend/examples/views/comment.py\n+++ b/backend/examples/views/comment.py\n@@ -12,9 +12,10 @@\n class CommentList(generics.ListCreateAPIView):\n     permission_classes = [IsAuthenticated & IsProjectMember]\n     serializer_class = CommentSerializer\n-    filter_backends = (DjangoFilterBackend, filters.SearchFilter)\n+    filter_backends = (DjangoFilterBackend, filters.SearchFilter, filters.OrderingFilter)\n     filterset_fields = [\"example\"]\n     search_fields = (\"text\",)\n+    ordering_fields = (\"created_at\", \"example\")\n \n     def get_queryset(self):\n         queryset = Comment.objects.filter(example__project_id=self.kwargs[\"project_id\"])\n", "issue": "Include Example number in the Project Comments view\nFeature description\r\n---------\r\nOn the backend API and in the dataset annotation interface, the Comments are associated with specific Examples. But in the Project Comments view, the Example association is unclear--all the comments are grouped together.\r\n\r\nCan the Project Comments view tab be improved to detail Examples, maybe even sort or group by Example?\r\n\r\nThanks!\n", "before_files": [{"content": "from django_filters.rest_framework import DjangoFilterBackend\nfrom rest_framework import filters, generics, status\nfrom rest_framework.permissions import IsAuthenticated\nfrom rest_framework.response import Response\n\nfrom examples.models import Comment\nfrom examples.permissions import IsOwnComment\nfrom examples.serializers import CommentSerializer\nfrom projects.permissions import IsProjectMember\n\n\nclass CommentList(generics.ListCreateAPIView):\n    permission_classes = [IsAuthenticated & IsProjectMember]\n    serializer_class = CommentSerializer\n    filter_backends = (DjangoFilterBackend, filters.SearchFilter)\n    filterset_fields = [\"example\"]\n    search_fields = (\"text\",)\n\n    def get_queryset(self):\n        queryset = Comment.objects.filter(example__project_id=self.kwargs[\"project_id\"])\n        return queryset\n\n    def perform_create(self, serializer):\n        serializer.save(example_id=self.request.query_params.get(\"example\"), user=self.request.user)\n\n    def delete(self, request, *args, **kwargs):\n        delete_ids = request.data[\"ids\"]\n        Comment.objects.filter(user=request.user, pk__in=delete_ids).delete()\n        return Response(status=status.HTTP_204_NO_CONTENT)\n\n\nclass CommentDetail(generics.RetrieveUpdateDestroyAPIView):\n    queryset = Comment.objects.all()\n    serializer_class = CommentSerializer\n    lookup_url_kwarg = \"comment_id\"\n    permission_classes = [IsAuthenticated & IsProjectMember & IsOwnComment]\n", "path": "backend/examples/views/comment.py"}], "after_files": [{"content": "from django_filters.rest_framework import DjangoFilterBackend\nfrom rest_framework import filters, generics, status\nfrom rest_framework.permissions import IsAuthenticated\nfrom rest_framework.response import Response\n\nfrom examples.models import Comment\nfrom examples.permissions import IsOwnComment\nfrom examples.serializers import CommentSerializer\nfrom projects.permissions import IsProjectMember\n\n\nclass CommentList(generics.ListCreateAPIView):\n    permission_classes = [IsAuthenticated & IsProjectMember]\n    serializer_class = CommentSerializer\n    filter_backends = (DjangoFilterBackend, filters.SearchFilter, filters.OrderingFilter)\n    filterset_fields = [\"example\"]\n    search_fields = (\"text\",)\n    ordering_fields = (\"created_at\", \"example\")\n\n    def get_queryset(self):\n        queryset = Comment.objects.filter(example__project_id=self.kwargs[\"project_id\"])\n        return queryset\n\n    def perform_create(self, serializer):\n        serializer.save(example_id=self.request.query_params.get(\"example\"), user=self.request.user)\n\n    def delete(self, request, *args, **kwargs):\n        delete_ids = request.data[\"ids\"]\n        Comment.objects.filter(user=request.user, pk__in=delete_ids).delete()\n        return Response(status=status.HTTP_204_NO_CONTENT)\n\n\nclass CommentDetail(generics.RetrieveUpdateDestroyAPIView):\n    queryset = Comment.objects.all()\n    serializer_class = CommentSerializer\n    lookup_url_kwarg = \"comment_id\"\n    permission_classes = [IsAuthenticated & IsProjectMember & IsOwnComment]\n", "path": "backend/examples/views/comment.py"}]}