title: In the process of categorising my blogs but keep hitting the wall "Page not found 404"
body: <p>I am a complete beginner so I apologies for my noobiness explanation. I am in the process of categorising my blogs.</p>
  
  <p>I created a model -> migrated it -> imported in view.py -> Imported the view that I created into urls.py -> and created URL for my new page but when I add the href to other pages (home) it takes me to the error.</p>
  
  <p>My codes:
  models.py</p>
  
  <pre><code>class Category(models.Model):
  name = models.CharField(max_length=100)
  
  def __str__(self):
      return self.name
  
  class Post(models.Model):
  title = models.CharField(max_length=100)
  content=models.TextField()
  date_posted=models.DateTimeField(default=timezone.now)
  author=models.ForeignKey(User, on_delete=models.CASCADE)
  category = models.CharField(max_length=100, default='Engineering')
  
  
  def __str__(self):
      return self.title
  
  
  
  def get_absolute_url(self):
      return reverse('post-detail', kwargs={'pk': self.pk})
  </code></pre>
  
  <p>Views.py:</p>
  
  <pre><code>from .models import Post, Category
  
  class CategoryListView(ListView):
  model = Post
  template_name= 'blog/category_posts.html'
  context_object_name = 'posts'
  ordering = ['-date_posted']
  paginate_by = 3
  </code></pre>
  
  <p>urls.py:</p>
  
  <pre><code>from django.urls import path
  from .views import (
  PostListView, 
  PostDetailView, 
  PostCreateView, 
  PostUpdateView, 
  PostDeleteView,
  UserPostListView,
  CategoryListView)
  
  path('category/&lt;str:category&gt;/', CategoryListView.as_view(), name='category-posts'),
  </code></pre>
  
  <p>home.html</p>
  
  <pre><code> &lt;a href="{% url 'category-posts' %}"&gt;{{ post.category }}&lt;/a&gt;
  </code></pre>