This is my code that fails:
dashboard = Dashboard.objects.get(slug=slug)
users = User.objects.all() # list of users
for editor in dashboard.dashboardeditor_set.iterator:
users.remove(editor.user)
The error: 'instancemethod' object is not iterable
From models.py:
class DashboardEditor(models.Model):
dashboard = models.ForeignKey(Dashboard)
user = models.ForeignKey(User)
Can anybody help me figure out how to scrub editors from the list of all users?
Thanks! :)