Django stops after 100 objects

I did a small Django project and I want to compare the added objects against each other to find a duble (I already use the unique_togetherMeta options , but this does not fully meet my needs).

When I run the script, it will be completed after 100 iterations, although there are about 60,000 objects.

objects = Django_app.objects.all()

for object_a in objects:
    for object_b in objects:
        compare( object_a, object_b)

Can anyone explain this behavior?

Decision:

objects = list( objects.all() )

Thank you all!

+4
source share
1 answer

Python . ( ) Python . , objects = list(objects), Python. objects , . Django Querysets . Queryset , . Queryset .

+2

All Articles