Exemple #1
0
 def get_queryset(self, **kwargs): 
     qs = super().get_queryset(**kwargs) 
     query = self.request.GET.get('q')
     if query:
         qs = Snapshot.objects.filter(title__icontains=query)
     for snapshot in qs:
         snapshot.icons = get_icons(snapshot) 
     return qs
Exemple #2
0
 def files(self, obj):
     return get_icons(obj)