File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414from guardian .shortcuts import assign_perm , get_objects_for_user , \
1515 get_users_with_perms , remove_perm
1616from django .views .generic import View
17- from rest_framework import renderers , status
17+ from rest_framework import renderers , status , filters
1818from rest_framework .exceptions import PermissionDenied , NotFound
1919from rest_framework .permissions import IsAuthenticated , AllowAny
2020from rest_framework .response import Response
@@ -221,6 +221,8 @@ def get_object(self):
221221class AppViewSet (BaseDryccViewSet ):
222222 """A viewset for interacting with App objects."""
223223 model = models .App
224+ filter_backends = [filters .SearchFilter ]
225+ search_fields = ['^id' , ]
224226 serializer_class = serializers .AppSerializer
225227
226228 def get_queryset (self , * args , ** kwargs ):
You can’t perform that action at this time.
0 commit comments