I'm having trouble using djangoś paginator function. In this question i can't find the solution: Django: Paginator + raw SQL query
With Table.object.all()
i have no trouble, but with raw sql i receive the error object of type 'RawQuerySet' has no len()
I tried also
num = len(list(ads)) paginator = Paginator(num, 2)
and i receive object of type 'int' has no len()
. I tried to print num and it contains the correct number so i don't understand why paginator doesn't like it. Hope someone can help.