I have a following code in django:
def index(request):
template_name = 'desks.html'
# query = Desk.objects.all()
desk_list = Desk.objects.all
paginator = Paginator(desk_list, 5)
page = paginator.page(1)
return render_to_response(template_name, {'desk_list': page}, )
Unfortunately, I get the following error:
object of type 'instancemethod' has no len()
At my model, I have defined only attributes.
Any idea what a mistake it can be?