Código Python:
Ver original
class Film(models.Model): title = models.CharField(max_length=100) original_title = models.CharField(max_length=100,blank=True,null=True) slug = models.SlugField(max_length=100, unique=True) content = HTMLField(blank=True) # I'm tried this, but not work, 'Film' object has no attribute 'info_set' # Por ejemplo como puedo hacer esto que funcione ya sea a nivel de modelo o template def quality(self): return [q.get_audio_display() for q in self.info_set.order_by("audio").distinct("audio")] class Serie(models.Model): title = models.CharField(max_length=100) original_title = models.CharField(max_length=100,blank=True,null=True) slug = models.SlugField(max_length=100, unique=True) content = HTMLField(blank=True) class Info(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = generic.GenericForeignKey('content_type', 'object_id') youtube_embed = models.IntegerField(choices=CHOICES_QUALITY) audio = models.CharField(max_length=50,choices=CHOICES_AUDIO)
Gracias.