I'm blanking here. I want to grab all the users from the userbase, but then only loop through 10 of them (I'm leaving out code that would explain why I wouldn't just grab 10 users from the db in the first place).
users = User.objects.all()
i = 0
while i < 10:
for user in users:
if user.is_active:
# do something
i += 1
This is creating an endless loop... What stupid detail am I missing?
for user in usersloop (i.e. all) whileicheck is out that loop...