《Django REST framework 入门到精通》视频课程上线了,全网稀缺资源,深度源码剖析,进阶高手之路!点击链接查看详情


user_image
By  Chris8090    On   2019年5月12日 23:12

在看到刘老师这篇十分细致的文档时,真的是欣喜若狂了,但在步骤(步骤10:返回动态页面),还是遇到如下问题,可否望刘老师指点迷津?改造views.py文件,以及修改index.HTML文件检查没问题的呀~ ------------------------------------------------------------------------ TypeError at /index/ context must be a dict rather than set. Request Method: GET Request URL: http://127.0.0.1:8000/index/ Django Version: 2.0.7 Exception Type: TypeError Exception Value: context must be a dict rather than set. Exception Location: C:\Users\Chris\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\context.py in make_context, line 274 Python Executable: C:\Users\Chris\AppData\Local\Programs\Python\Python36-32\python.exe Python Version: 3.6.5 Python Path: ['D:\\Share', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\Python36-32\\python36.zip', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\Python36-32\\DLLs', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\Python36-32\\lib', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\Python36-32', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages'] Server time: Sun, 12 May 2019 14:50:42 +0000