title: Reverse for 'add_comment' with keyword arguments '{u'slug': None}' not found. 1 pattern(s) tried: [u'blog/(?P<pk>\\d+)/comment/$']
body: <p>I am getting an error - Reverse for 'add_comment' with keyword arguments '{u'slug': None}' not found. 1 pattern(s) tried: [u'blog/(?P\d+)/comment/$']</p>
  
  <p>I added - app_name= 'blog' - to urls to solve the earlier error of namespace</p>
  
  <p>but now I am stuck with a new error</p>
  
  <p>my urls.py</p>
  
  <pre><code>url(r'^(?P&lt;pk&gt;\d+)/comment/$', views.add_comment, name='add_comment')
  </code></pre>
  
  <p>my views.py</p>
  
  <pre><code>def add_comment(request, slug):
  post = get_object_or_404(Post, slug=slug)
  if request.method == 'POST':
      form = CommentForm(request.POST)
      if form.is_valid():
          comment = form.save(commit=False)
          comment.post = post
          comment.save()
          return redirect('blog:post', slug=post.slug)
  else:
      form = CommentForm()
  
  template = 'blog/add_comment.html'
  context = {'form': form}
  return render(request, template, context)
  </code></pre>
  
  <p>my models.py</p>
  
  <pre><code>class Post(models.Model):
  title = models.CharField(max_length=200)
  body = models.TextField()
  date = models.DateTimeField()
  slug = models.SlugField(max_length=250, blank=True, null=True)
  
  def __unicode__(self):
      return self.title
  
  def save(self, *args, **kwargs):
      self.slug = slugify(self.title)
      super(Post, self).save(*args, **kwargs)
  
  def get_absoulte_url(self):
         return reverse('blog:post.html', args=[self.slug])
  
  class Comment(models.Model):
  post = models.ForeignKey(Post, related_name='comments', blank=True, 
  null=True)
  user = models.CharField(max_length=250)
  email = models.EmailField()
  body = models.TextField()
  created = models.DateTimeField(auto_now_add=True)
  approved = models.BooleanField(default=False)
  
  def approved(self):
      self.approved = True
      self.save()
  
  def __str__(self):
      return self.user
  </code></pre>
  
  <p>my template add_comment.html</p>
  
  <pre><code>{% extends "personal/header.html" %}
  
  {% block content %}
  &lt;h1&gt;Add new comment&lt;/h1&gt;
  &lt;form method='POST'&gt;{% csrf_token %}
  {{ from.as_p }}
  &lt;button type='submit'&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  {% endblock %}
  </code></pre>