• 技术文章 >Python框架 >Django

    django注释有什么用

    silencementsilencement2019-07-27 10:09:22原创3121

    Django模板template(html)中使用注释comment。

    下面是Django注释符及实例

    单行注释:

    使用 {# #} 单行注释,例如:

    {# Everything you see here is a comment. It won't show up in the HTML output. #}

    多行注释:

    {% comment %} this is a comment {% endcomment %}

    英文解释:Ignores everything between {% comment %} and {% endcomment %}。

    官方解释:

    e076199d2060b5c54363c6ee7ab707f.png

    专题推荐:注释
    品易云
    上一篇:django面试会问什么 下一篇:django可以写php吗

    相关文章推荐

    • django和flask哪个好• django面试会问什么

    全部评论我要评论

    © 2021 Python学习网 苏ICP备2021003149号-1

  • 取消发布评论
  • 

    Python学习网