{% load humanize %} {% with stats=object.get_daily_stats %} {% if stats.currently_online > 0 %} {{stats.currently_online|intcomma}} online {% elif stats.online == True %} Online {% elif stats.online == False %} Offline {% endif %} {% endwith %}