Can't get all events related to events related to m2m field
I added user instance to links
I can get user from event.links.all()
But I can't get all events for user. user.event_set is not working
class Event(models.Model):
links = GM2MField(through='EventThrough', blank=True)
class EventThrough(models.Model):
event = models.ForeignKey(EventLog, on_delete=models.CASCADE, db_index=True)
object = GenericForeignKey(ct_field='content_type', fk_field='object_id')
content_type = models.ForeignKey("contenttypes.ContentType",
on_delete=models.CASCADE, db_index=True)
object_id = models.CharField(max_length=255) # rename to object_id
Can't get all events related to events related to m2m field I added
user
instance to links I can get user from event.links.all() But I can't get all events for user. user.event_set is not working