mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2024-09-19 23:49:07 -04:00
Merge pull request #559 from jdcaballerov/hotfix-public-search
Hotfix public page search
This commit is contained in:
commit
193dde03f0
1 changed files with 2 additions and 1 deletions
|
@ -92,12 +92,13 @@ class PublicArchiveView(ListView):
|
|||
template = 'snapshot_list.html'
|
||||
model = Snapshot
|
||||
paginate_by = 100
|
||||
ordering = ['title']
|
||||
|
||||
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)
|
||||
qs = qs.filter(title__icontains=query)
|
||||
for snapshot in qs:
|
||||
snapshot.icons = get_icons(snapshot)
|
||||
return qs
|
||||
|
|
Loading…
Reference in a new issue