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

为什么 no moudle name hello

from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.

def hello(request):
	return HttpResponse('<html>Hello world!</html>')
	
runserver 一直提示 no moudle name 不知道原因处在哪里 urls.py的配置改了好几遍
url(r'^helloworld/$', views.hello)


正在回答

1 回答

你看一下 是不是没有引入model包 前面加一个

from . import models


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

举报

0/150
提交
取消
django初体验
  • 参与学习       52920    人
  • 解答问题       82    个

本教程主要讲解Django基础入门知识,不容错过的Django初体验

进入课程

为什么 no moudle name hello

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号