title: Reverse for 'blog_detail' with no arguments not found. 1 pattern(s) tried: ['blog/(?P<pk>[0-9]+)$']
body: <p>Reverse for 'blog_detail' with no arguments not found. </p>
  
  <blockquote>
    <p>Reverse for 'blog_detail' with no arguments not found. 1 pattern(s)
    tried: ['blog/(?P[0-9]+)$']</p>
  </blockquote>
  
  <p>models.py </p>
  
  <pre><code>class Blog(models.Model):
      author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
      title = models.CharField(max_length=80)
      slug = models.SlugField(max_length=80, unique=True, db_index=True, blank=True, null=True)
      description = models.TextField(max_length=1080, blank=True, null=True)
      image = models.ImageField(upload_to='blog/')
      tags = models.CharField(max_length=30, blank=True, null=True)
      category2 = models.CharField(max_length=50, blank=True, null=True)
      category = models.ManyToManyField("BlogCategory")
      created_on = models.DateTimeField(default=timezone.now())
      is_active = models.BooleanField(default=True)
  
      def __unicode__(self):
          return self.title
  
      def get_absolute_url(self):
          return reverse("blog_detail", kwargs={"pk": self.pk})
  </code></pre>
  
  <p>views.py </p>
  
  <pre><code>class BlogDetail(DetailView):
      model = Blog
      queryset =  Blog.objects.all()
      template_name = "testapp/blogd.html"
  
  </code></pre>
  
  <p>urls.py </p>
  
  <pre><code>
  from django.urls import path
  from .views import (BlogList, BlogDetail)
  
  urlpatterns = [
  
      path('blog/l', BlogList.as_view(), name='blog_list'),
      path('blog/&lt;int:pk&gt;', BlogDetail.as_view(), name='blog_detail'),
  ]
  
  
  </code></pre>