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

为什么我的index.html不起作用,显示的依然是hello,world

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>HELLO,index!</h1>
</body>
</html>
from django.shortcuts import render
from django.http import HttpResponse


def index(request):
    return render(request, 'index.html')


正在回答

2 回答

看一下你的blog2应用下是不是import第一个应用的views

1 回复 有任何疑惑可以回复我~

已解决谢谢回答

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
django入门与实践
  • 参与学习       65212    人
  • 解答问题       868    个

手把手带你进入Django开发的大门,充分领略Django的魅力

进入课程

为什么我的index.html不起作用,显示的依然是hello,world

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信