class Subject(models.Model):
name = models.CharField(max_length=200)
class Referat(models.Model):
subject = models.ForeignKey(Subject)
name = models.CharField(max_length=600)
filename = models.FileField(upload_to='tmp', max_length=200)
dowloaded_times = models.IntegerField()
Джанга 1.02 без агрегації
Буду дуже вдячний