I need to display the values of the categories field from the class Analiza from the models below in a template.
class Category(models.Model):
name = models.CharField(max_length=60)
def __unicode__(self):
return self.name
class Analiza(models.Model):
...
categories = models.ManyToManyField(Category, blank = True, null = True, verbose_name = "Категорија")
...
How do I do that? I've been reading documentation, but no reference to a situation of this kind (ManyToMany of ForeignKey).
Thanks in advance.