2👍
✅
Can’t comment unless looking at Member model. But
- Can’t we use .filter with back navigation, instead of get_members
- 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)
Source:stackexchange.com