title: No Post matches the given query.in django
body: <p>am using django 2.0 and here is the problem
  Page not found (404)
  Request Method: GET
  Request URL:    <a href="http://localhost:8000/blog/post-detail/" rel="nofollow noreferrer">http://localhost:8000/blog/post-detail/</a>
  Raised by:  blog.views.post_detail
  No Post matches the given query.</p>
  
  <p>here is the blog/urls</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>from django.urls import path,include
  from .import views
  
  urlpatterns = [
      path('blog/',views.post_list,name="post_list"),
      path('blog/post-detail/',views.post_detail,name="post_detail"),
  
  ]</code></pre>
  </div>
  </div>
  </p>
  
  <p>and views.py </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>from django.shortcuts import render,get_object_or_404
  from.models import Post
  
  # Create your views here.
  def post_list(request):
      object_list=Post.objects.all()
      context={
          'object_list': object_list,
      }
      return render(request,"blog.html",context)
  
  def post_detail(request,slug=None):
      post=get_object_or_404(Post,slug=slug)
      context={
         'post':post,
      }
      return render(request,"post_detail.html",context)</code></pre>
  </div>
  </div>
  </p>
  
  <p>and the post_detail.html</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{% extends "base.html" %}
  {% load static %}
  {% block seo_title %}{% endblock %}
  {% block seo_description %}{% endblock %}
  {% block Content %}
  &lt;article&gt;
    &lt;div class="embed-responsive embed-responsive-16by9"&gt;
  &lt;img src="images/blog1.jpg" alt="" /&gt;
  &lt;/div&gt;
    &lt;div class="post-content"&gt;
  
  &lt;h2&gt;{{post.title}}&lt;/h2&gt;
  &lt;div&gt;
  {{post.created}}  Author {{Post.user}}
  &lt;hr/&gt;
  &lt;p&gt;{{post.body}}&lt;/p&gt;
  &lt;/article&gt;
  
  {% endblock Content %}</code></pre>
  </div>
  </div>
  </p>
  
  <p>CAN ANYONE HELP ON THIS THE ONLY PROBLEM I SEE  THAT  SLUG THING I MUST HAVE CONFUSED SOMEWHERE
  blog.html</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!-- Blog --&gt;
  &lt;div class="blog"&gt;
    &lt;div class="row"&gt;
      &lt;div class="col-sm-8"&gt;
  
        &lt;!-- Blog Post--&gt;
  {% for obj in object_list %}
      {% if obj.status == 'Published' %}
        &lt;article&gt;
          &lt;div class="embed-responsive embed-responsive-16by9"&gt;
        &lt;img src="images/blog1.jpg" alt="" /&gt;
        &lt;/div&gt;
          &lt;div class="post-content"&gt;
  
      &lt;h2&gt;{{obj.title}}&lt;/h2&gt;
      &lt;div&gt;
      {{obj.created}}  Author {{obj.user}}
      &lt;hr/&gt;
      &lt;p&gt;{{obj.body}}&lt;/p&gt;
      &lt;a class="mtr-btn button-navy ripple" href= "{% url 'post_detail' slug= post.slug %}"&gt;Continue reading →&lt;/a&gt;&lt;br&gt;
      &lt;/div&gt;
      &lt;/article&gt;
      {% endif %}
  {% endfor %}</code></pre>
  </div>
  </div>
  </p>