def get_queryset(self):
<EOL>queryset = super(DeviceList, self).get_queryset()<EOL>search = self.request.query_params.get('<STR_LIT>', None)<EOL>if search is not None:<EOL><INDENT>search_query = (<EOL>Q(name__icontains=search) |<EOL>Q(description__icontains=search)<EOL>)<EOL>queryset = queryset.filter(search_query)<EOL><DEDENT>return queryset<EOL>
Optionally restricts the returned devices
by filtering against a `search` query parameter in the URL.