categories = Category.objects.all() t = loader.get_template(\'index.html\') v = Context({ \'categories\': categories }) return HttpResponse(t.rend
Just get rid of the parentheses:
{% for company in category.company_set.all %}
Here's the appropriate documentation. You can call methods that take 0 parameters this way.