ubuntu下的
pycharm 在 template 里块注释(快捷键 ctrl+/
):
<!-- <p class="js-header" name="n">名称</p>
<p class="js-header" name="pn">商品编号</p>
<p class="js-header" name="b">品牌</p>
<p class="js-header" name="s">系列</p>
<p class="js-header" name="d">上传日期</p>-->
实际上是无效的。
正确注释 template 内块代码的标志为:
{# <p class="category-title">#}
{# 分类修改记录#}
{# </p>#}
这才是django的块代码注释方式,
不知在哪里设置该快捷键?
怪我咯2017-04-17 17:57:08
Thanks to the comment area @永中 who can’t learn programming
The community version does not have this function, and it has nothing to do with the platform.
Sure enough, this situation only occurs in the community version.
巴扎黑2017-04-17 17:57:08
1) First select the block to be commented, then Ctrl + Shift + "/"
2) Select any line of the block to be commented, Ctrl + "-" to fold the code into one line, then Ctrl + "/" to comment
怪我咯2017-04-17 17:57:08
Django template allows the same comments as python, the commented out html will not be output to the client
Line comment, cursor to the current line ctrl+/
Block comment, select the block to be commented ctrl+shift+/