title: How to add markdown editor to custom django comment?
body: <p>I am new to django and created a simple blog app and now try to add markdown to the comments: </p>
  
  <p>Here is the model for comment:</p>
  
  <pre><code>class Comment(models.Model):
      created = models.DateTimeField(auto_now_add=True)
      author = models.CharField(max_length=60)
      body = models.TextField()
      post = models.ForeignKey(Blog)
  
      def __unicode__(self):
          return unicode("%s: %s" % (self.post, self.body[:60]))
  </code></pre>
  
  <p>in the post.html, I have:</p>
  
  <pre><code>&lt;!-- Add Comments  --&gt;
  
      {% if user.is_authenticated %}
          &lt;div id="addc"&gt;Your Comment?&lt;/div&gt;
          &lt;!-- Comment form  --&gt;
          &lt;form action="{% url "blog.views.add_comment" post.id %}" method="POST"&gt;{% csrf_token %}
              &lt;div id="comment-form"&gt;
                  &lt;p&gt;{{ form.body }}&lt;/p&gt;
              &lt;/div&gt;
              &lt;div id="submit"&gt;&lt;input type="submit" value="Submit"&gt;&lt;/div&gt;
          &lt;/form&gt;
      {% endif %}
  </code></pre>
  
  <p>and the views that renders post(and comment):</p>
  
  <pre><code>def post_withslug(request, post_slug):
      post = Blog.objects.get(slug = post_slug)
      comments = Comment.objects.filter(post=post)
      d = dict(post=post, comments=comments, form=CommentForm(), user=request.user)
      d.update(csrf(request))
      return render_to_response("blog/post.html", d)    
  </code></pre>
  
  <p>in form.py I have:</p>
  
  <pre><code>from django_markdown.widgets import MarkdownWidget
  
  class CommentForm(forms.ModelForm):
      body = forms.CharField(widget=MarkdownWidget())
      class Meta:
          model= Comment
          fields= ('body',) 
  </code></pre>
  
  <p>I have used <a href="https://github.com/klen/django_markdown" rel="nofollow">django-markdown</a> for admin backend and it works fine there however I'm not sure how to apply this app (or something else to the same effect) to the blog comments and I could not find any tutorial about it. 
  So I appreciate your help.</p>