Django JQuery autocomplete showing No search results
<p>I'll directly go to the code</p>

<p><strong>models.py</strong>
<p></p>

<pre><code>class Restaurant(models.Model):
    name = models.CharField(max_length=100)
    owner = models.CharField(max_length=100)
    city = models.CharField(max_length=50)
    state = models.CharField(max_length=50)
    country = CountryField(choices=list(countries))
    contact = models.CharField(max_length=15)
    def __str__(self):
        return self.name
</code></pre>

<p><strong>template.html</strong>
<p></p>

<pre><code>{% load staticfiles %}
&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;Dashboard&lt;/title&gt;
    &lt;script src="//code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt;
    &lt;script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"&gt;&lt;/script&gt;
    &lt;script src="{% static 'registration/jquery.js' %}"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;input id="tags"/&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p><strong>jquery.js</strong></p>

<pre><code>$(document).ready(function(){
 $( "#tags" ).autocomplete({
                        source: "{% url get_restaurant %}",
                        selectFirst: true,
                        minLength: 2
    });
});
</code></pre>

<p><strong>urls.py</strong>
<p></p>

<pre><code>url(r'^get_restaurant/$', views.get_restaurant, name='get_restaurant')
</code></pre>

<p><strong>views.py</strong>
<p></p>

<pre><code>def get_restaurant(request):
    term = request.GET.get('term')
    bslk = Restaurant.objects.filter(name__icontains=term)
    res = []
    for b in bslk:
        dict = {'id':b.id, 'label':b.name, 'value':b.name}
        res.append(dict)
    return HttpResponse(simplejson.dumps(res),'application/json')
</code></pre>

<p>I used the following import:<p>
<code>import simplejson</code> for views.py <p>
I have values for name in Restaurant models, but the problem is autocomplete is showing <code>No search results!</code>
<p>
Thanks in advance!</p>