Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 导入错误:无法导入名称';呈现"对"响应';从';django.捷径';_Python_Django - Fatal编程技术网

Python 导入错误:无法导入名称';呈现"对"响应';从';django.捷径';

Python 导入错误:无法导入名称';呈现"对"响应';从';django.捷径';,python,django,Python,Django,当我将django chroniker迁移到我的django项目中时,我发现自从django 2.0以来,render\u to\u response已被删除,如何修复此错误??感谢您呈现到\u响应在django中不可用。快捷方式(呈现到\u响应快捷方式在django 2.0中被弃用,在django 3.0中被删除)。您可以像下面那样使用渲染 from django.shortcuts import render_to_response ImportError: cannot import na

当我将
django chroniker
迁移到我的django项目中时,我发现自从django 2.0以来,
render\u to\u response
已被删除,如何修复此错误??感谢您

呈现到\u响应
django中不可用。快捷方式
(呈现到\u响应快捷方式在django 2.0中被弃用,在django 3.0中被删除)。您可以像下面那样使用
渲染

from django.shortcuts import render_to_response
ImportError: cannot import name 'render_to_response' from 'django.shortcuts' (C:\Users\gtdra\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\shortcuts.py)

render\u to\u response
在django中不可用。快捷方式
(在django 2.0中,render\u to\u response快捷方式已被弃用,并在django 3.0中被删除。)。您可以像下面那样使用
渲染

from django.shortcuts import render_to_response
ImportError: cannot import name 'render_to_response' from 'django.shortcuts' (C:\Users\gtdra\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\shortcuts.py)

从django.shortcuts导入render您尝试过搜索django文档吗?从django.shortcuts导入render您尝试过搜索django文档吗?是的,我使用它,但是当我迁移django chroniker时,它有导入错误render_to_响应,我认为django chroniker使用了render_to_响应,但我不知道如何修复it@namphan然后,您必须更新该存储库我创建了一个PR:Pyes我使用它,但是当我迁移django chroniker时,它有导入错误render_to_响应,我认为django chroniker使用了render_to_响应,但我不知道如何修复it@namphan然后你必须更新我的存储库,创建一个PR:P