我正在使用pycharm社区,我在django上创建了测试项目,并在模板中创建了degree.html文件。 我在degree.html中有以下代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>welcome to degree site of {{student_id}}</title>
</head>
<body>
{%for item in degree%}
<h4>
{{item.student_dgree}}
</h4>
<h4>
{{item.student_id}}
</h4>
{%endfor%}
</body>
</html>
我不能完成像“for,endfor,…等”这样的指令 我使用pip从cmd和pycharm的终端安装了django
并从文件->;设置->;项目解释器我添加django包并安装它
救命啊
PyCharm社区不支持Django模板语言(仅支持专业版)。您可以尝试像Djaneiro这样的扩展/插件:
https://plugins.jetbrains.com/plugin/9295-djaneiro-for-pycharm
你可以研究一下Kite——一个AI“编码助手”,它不仅为Django提供有用的自动完成功能
https://kite.com/
以下是Django for Python的特定文档-https://kite.com/python/docs/django
相关问题 更多 >
编程相关推荐