Django search as input is entered into form
<p>I currently have a working search form in my project that passes through form data to the GET request. Pretty standard.
What I'm wanting to do is search as data is entered into the search form, so that results will display in real time with search data. This is much like what Google does with the instant desktop results. Is this something that's possible with Django?
Below is my current (simple) search</p>

<pre><code>#views.py
def ProductView(request):
title = 'Products'
all_products = Product.objects.all().order_by("product_Name")
query = request.GET.get("q")
if query:
    products = all_products.filter(
        Q(product_Name__contains=query) |
        Q(manufacturer__contains=query)
    ).distinct()
    return render(request, 'mycollection/details.html', { 'all_products' : products })
</code></pre>

<p>-</p>

<pre><code>&lt;!-- HTML --&gt;
    &lt;!-- SEARCH BAR --&gt;
&lt;form class="navbar-form navbar-left" role="search" method="get" action="{% url 'mycollection:products' %}"&gt;
    &lt;div class="form-group"&gt;
        &lt;input type="text" class="form-control" name="q" value="{{ request.GET.q }}"&gt;
    &lt;/div&gt;
    &lt;button type="submit" class="btn btn-default"&gt;Search&lt;/button&gt;
&lt;/form&gt;
</code></pre>

<p>you can save the request.data in to session and if any data is associated with session search data you can put in to value of search box.</p>

<pre><code>request.session['search'] = request.GET.get('q','')
</code></pre>

<p>templete :</p>

<pre><code>{% if request.session.search %} {{request.session.search}} {% endif %}
</code></pre>

python django search