11
profile_city = models.Profile.objects.get(id=profile_id)
profile_city.cities
returns a manager class which you cannot iterate.
Try this instead of profile_city.cities
profile_city.cities.all()
Source:stackexchange.com
11
profile_city = models.Profile.objects.get(id=profile_id)
profile_city.cities
returns a manager class which you cannot iterate.
Try this instead of profile_city.cities
profile_city.cities.all()