I have two variables : count, which is a number of my filtered objects, and constant value per_page. I want to divide count by per_page and get integer value but I no matter
its because how you have it set up is performing the operation and then converting it to a float try
count = friends.count()
print count
per_page = float(2)
print per_page
pages = math.ceil(count/per_pages)
print pages
pages = count/per_pages
By converting either count or per_page to a float all of its future operations should be able to do divisions and end up with non whole numbers