class Author(models.Model):
name = models.CharField(max_length=100)
# Другие поля автора
class Publication(models.Model):
title = models.CharField(max_length=100)
# Другие поля публикации
authors = models.ManyToManyField(Author, through='Affiliation')
class Affiliation(models.Model):
author = models.ForeignKey(Author, on_delete=models.CASCADE)
publication = models.ForeignKey(Publication, on_delete=models.CASCADE)
affiliation = models.CharField(max_length=100)