第一天学习django,报错NameError: name 'include' is not defined,来记录一下错误
![在这里插入图片描述](https://www.icode9.com/i/ll/?i=20201212130609275.png?,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01hcmtleU1hcms=,size_16,color_FFFFFF,t_70)
上网一查只用在django自动生成的包urls.py中加入
from django.conf.urls import include
![在这里插入图片描述](https://www.icode9.com/i/ll/?i=2020121213065622.png?,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01hcmtleU1hcms=,size_16,color_FFFFFF,t_70)
成功运行
![成功运行](https://www.icode9.com/i/ll/?i=20201212130951398.png?,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L01hcmtleU1hcms=,size_16,color_FFFFFF,t_70)
完美解决,在此感谢喜欢海呀提供的博文
标签:name,defined,django,NameError,报错,include
来源: https://www.cnblogs.com/hezhe666/p/14124392.html