I am having a models.py as follows
class Comment(models.Model):
auther_name = models.CharField(max_length=20, null=False, blank=False)
comment_body = models.TextField(max_length=200, null=False, blank=False)
class Post(models.Model):
comments = models.ManyToManyField(Comment)
So let's say i have a comment Object Instance which's id is 2 and raw content
How to get parent post_id which contains this comment??