[Answered ]-Django – dreaded 'iteration over non-sequence'

2👍

Can’t comment unless looking at Member model. But

  1. Can’t we use .filter with back navigation, instead of get_members
  2. Do we need those many loops, and db access inside loop? ex:

clubs = Club.objects.filter(location__country__in = list_of_user_countries)

If your final list is list of members, you can do that as I mentioned above (at least in optimized way)

Leave a comment