i want to display my django search result on a new html page instead of the page where the search bar is. i have tried manipulating my form tag and it still does’nt redirect to the page when i search, rather it stays on the same page.
index.html
<form action="{% url 'elements:all-elements' %}" method="get">
<input type="text" class="form-control" name="q" value="{{ request.GET.q }}" type="text" placeholder="Search Free Web Elements and Resources">
<button type="submit" class="btn bt-round" ><b><i class="bi bi-search"></i></b></button>
</form>
views.py - this is the view handling the seach, i dont know if anything would be appended there
# Search Function
def index(request):
vectors = Vectors.objects.filter(status='published').order_by('?')[:12]
query = request.GET.get("q")
if query:
vectors = vectors.filter(
Q(title__icontains=query)).distinct()