1👍
✅
You just need a foreign key relation for that use case
class Papers(models.Model):
'''
All the published papers
'''
title = models.CharField(max_length=300) # title
issue = models.ForeignKey(Issues, on_delete=models.CASCADE)
def __str__(self):
return self.title
class Issues(models.Model):
'''
All issues
'''
number = models.SmallIntegerField() # issue number
def __str__(self):
return str(self.number)
Source:stackexchange.com