title: 404 error , Get Object or 404 django
body: <p>Hey guys i have made a blog website in which if i type in the number beside like this: blog/1, I should get the first blog or i should get a 404 error! but i only get the 404 error whereas i have the blogs! My project name is portfolio-project and the urls.py for it look like:</p>
  
  <pre><code>from django.contrib import admin
  
  from django.urls import path, include
  
  from django.conf import settings
  
  from django.conf.urls.static import static
  
  import blog.views
  
  urlpatterns = [
      path('admin/', admin.site.urls),
      path('', blog.views.home, name='home'),
      path('blog/', include('blog.urls')),
  ]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  </code></pre>
  
  <p>And then it goes to blog.urls, and it looks like:</p>
  
  <pre><code>from django.urls import path
  
  from . import views
  
  urlpatterns = [
      path('', views.home, name='allblogs'),
      path('&lt;int:blog_id&gt;/', views.detail, name='detail'),
  ]
  </code></pre>
  
  <p>as i put blog/1 It goes to the views.detail file which looks like this:</p>
  
  <pre><code>from django.shortcuts import render, get_object_or_404
  from .models import Blog
  
  def home(request):
      blogs = Blog.objects
      return render(request, 'blog/home.html', {'blogs':blogs})
  
  def detail(request, blog_id):
      detailblog = get_object_or_404(Blog, pk=blog_id)
      return render(request, 'blog/detail.html', {'blog':detailblog})
  </code></pre>
  
  <p>Ok, So according to this i should go to the details.html and it has</p>
  
  <p>{{ blog.title }}</p>
  
  <p>But i dont see anything but an 404 error!</p>