我试图在django-notifications-hq中隐藏通知计数为 0 时隐藏通知计数 我尝试了以下方法,但它没有定期更新并正确显示数字。
{% live_notify_badge as nc %}
{% if nc > 0|add:0 %}
<span class="badge-notifications badge badge-pill badge-danger" style="float:right;margin-bottom:-3px;margin-top: -2px !important; margin-left: 10px !important; font-size: 0.6rem;">
{% live_notify_badge %}</span>
{% endif %}