From d3132746154236e5b4a6fe695ecf74920f4e910a Mon Sep 17 00:00:00 2001 From: radex Date: Mon, 11 May 2020 21:25:35 +0200 Subject: [PATCH] better index --- storage/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/storage/views.py b/storage/views.py index a3f1e2e..0138eb0 100644 --- a/storage/views.py +++ b/storage/views.py @@ -56,7 +56,9 @@ def apply_smart_search(query, objects): def index(request): - return render(request, 'index.html') + return render(request, 'results.html', { + 'results': Item.get_roots() + }) def search(request): @@ -75,9 +77,7 @@ def search(request): def item_display(request, pk): if not pk: - return render(request, 'results.html', { - 'results': Item.get_roots() - }) + return index(request) item = get_object_or_404(Item, pk=pk) labels = item.labels.all()