关于Djiango中 前端多对多字段点(,)的显示问题

时间:2019-10-21 10:03:14   收藏:0   阅读:66

技术分享图片

 

 去除点的方法:

                <td>
                    {% for roles_son in roles.permissions.all %}
                        {% if forloop.last %} # 利用模板语言中的循环机制来判断
                            {{ roles_son }} &nbsp;
                        {% else %}
                        {{ roles_son }} &nbsp; , &nbsp;
                        {% endif %}
                    {% endfor %}
                </td>

 

原文:https://www.cnblogs.com/Rivend/p/11711274.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!