<!-- Search Bar -->
<form action="{% url 'enc:search' %}" method="POST">
{% csrf_token %}
<input class="search" type="text" name="q" placeholder="Search">
<input type="submit" value="Submit">
</form>
from django.shortcuts import render
def search (rqst):
if rqst.method == "POST":
title = request.POST.get("r")
return render(rqst,'newTemplate.html', { 'title' : title })
else:
return render(rqst,'search_page.html')
Comments
Leave a comment