目前,我正在向数据库中的所有用户发送通知。如何获取我所有朋友的列表,以便将通知发送给我所有的朋友?
if new and notification:
notification.send(User.objects.all().exclude(id=self.owner.id),
"listing_new",
{'listing':self, },
)
目前,我正在向数据库中的所有用户发送通知。如何获取我所有朋友的列表,以便将通知发送给我所有的朋友?
if new and notification:
notification.send(User.objects.all().exclude(id=self.owner.id),
"listing_new",
{'listing':self, },
)