Search
http://127.0.0.1:8000/search/?q=Django html < form action = "{% url 'search' %}" class = "d-flex" method = "GET"> < input class = "form-control me-2" type = "text" placeholder = "Search" aria-label="Search" name="q"> < button class = "btn btn-outline-success" type = "submit" >Sea rch</button> </ form > views.py def search ( request ): q = request. GET .get( 'q' ) posts = Post.objects.filter( Q( title__icontains = q) | Q( overview__icontains = q) ).distinct() param = { 'posts' :posts, 'pop_post' :Post.objects.order_by(...