为了账号安全,请及时绑定邮箱和手机立即绑定

前面一路过来都正确,在后面步骤中出错了,是哪个原因

前面一路过来都正确,在后面步骤中出错了,是哪个原因

大漠孤雁 2019-10-28 23:35:27
Page not found (404)Request Method:GETRequest URL:http://127.0.0.1:8000/blog/index/Using the URLconf defined in myblog.urls, Django tried these URL patterns, in this order:admin/blog/The current path, blog/index/, didn't match any of these.You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.python3.6+django2.0url.py如下:from django.contrib import admin from django.urls import path from blog import views urlpatterns = [     path('admin/', admin.site.urls),     path('blog/', views.index),views.py如下:from django.shortcuts import render from blog import models def index(request):     article = models.Article.objects.get(pk=1)     return render(request, 'blog.html', {'article': article})
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 999 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信