django:报错NameError: name ‘include‘ is not defined

第一天学习django,报错NameError: name 'include' is not defined,来记录一下错误

![在这里插入图片描述]( https://img-blog.csdnimg.cn/20201212130609275.png?x-oss-process=image/watermark ,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01hcmtleU1hcms=,size_16,color_FFFFFF,t_70)
上网一查只用在django自动生成的包urls.py中加入

from django.conf.urls import include

![在这里插入图片描述]( https://img-blog.csdnimg.cn/2020121213065622.png?x-oss-process=image/watermark ,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01hcmtleU1hcms=,size_16,color_FFFFFF,t_70)
成功运行
![成功运行]( https://img-blog.csdnimg.cn/20201212130951398.png?x-oss-process=image/watermark ,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01hcmtleU1hcms=,size_16,color_FFFFFF,t_70)

完美解决,在此感谢喜欢海呀提供的博文

posted @ 2020-12-12 13:25  和喆  阅读(756)  评论(0)    收藏  举报