in models.py
def get_categories(self):
return self.objects.filter('category_class <> "sales'
in views.py
data = Category.get_categories()
context = Context({'title': 'Search', 'form': form, 'data': data})
return render_to_response('index.html', context)
this is not working.