I'm getting into the world of Django
and I was trying to generate different types of models. Now I am creating a model with a class 'Tags' which has a key that calls another object of the class (To create objects linked by relationship). The fact is that I was reading and I can not find the answer that works for me. I leave here the class I did:
class Tags(models.Model):
tagname= models.CharField(max_length=20)
description = models.CharField(max_length=100)
related_tag = models.ForeignKey ('self',null=True)
I've also tried with related_name in the arguments and with related_query_name, but I'm not sure if I used them well. I put them like this:
related_tag = models.ForeignKey ('self',null=True,related_name='Tags',related_query_name='Tags')