From da2a5959d1118ba8c40f3219be62933f0a3ae96a Mon Sep 17 00:00:00 2001 From: Artur Borecki Date: Thu, 12 Mar 2026 10:12:44 +0100 Subject: [PATCH] feat(search/views.py): search only courses --- search/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/search/views.py b/search/views.py index cab28d9..41d2f91 100644 --- a/search/views.py +++ b/search/views.py @@ -2,6 +2,7 @@ from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.template.response import TemplateResponse from wagtail.models import Page +from home.models import CoursePage # To enable logging of search queries for use with the "Promoted search results" module # @@ -20,7 +21,7 @@ def search(request): # Search if search_query: - search_results = Page.objects.live().search(search_query) + search_results = CoursePage.objects.live().search(search_query) # To log this query for use with the "Promoted search results" module: