title: Building Comment Model Django
body: <pre><code>class Comment(models.Model):
      post = models.ForeignKey(Post,on_delete=models.CASCADE,related_name='comments')
      name = models.CharField(max_length=80)
      email = models.EmailField()
      body = models.TextField()
      created_on = models.DateTimeField(auto_now_add=True)
      active = models.BooleanField(default=False)
      post = models.ForeignKey(Post,on_delete=models.CASCADE,related_name='comments')
  </code></pre>
  
  <blockquote>
    <p>NameError: name 'Post' is not defined</p>
  </blockquote>
  
  <p>After this code make migrations also giving this error post is not defined. A lot of people work with this code in different sites. Why its not working every time showing <code>Post</code> is not defined. What can i do? Please help. </p>