@register.filter    
def places_left(value):
    return (value["maxNoOfAttendees"]-len(value["attendees"]))
dataset/ETHPy150Open mollyproject/mollyproject/molly/apps/sakai/templatetags/molly_sakai.py/places_left/original