def METHOD_NAME(model, field='time', **kwargs):
    """Takes a Django model and a set of queryset filter arguments, and
    returns a dictionary with highchart settings and data, suitable as
    a JsonResponse() argument.  The model must have a DateTimeField field.
    If the time field is named something else than 'time', the name must
    be supplied."""
    assert field in [ f.name for f in model._meta.get_fields() ]
    objects = ( model.objects.filter(**kwargs)
                                .annotate(date=TruncDate(field, tzinfo=datetime.timezone.utc))
                                .order_by('date')
                                .values('date')
                                .annotate(count=Count('id')))
    if objects.exists():
        obj_list = list(objects)
        today = date_today(datetime.timezone.utc)
        if not obj_list[-1]['date'] == today:
            obj_list += [ {'date': today, 'count': 0} ]
        data = [ ((e['date'].toordinal()-epochday)*1000*60*60*24, e['count']) for e in obj_list ]
    else:
        data = []
    return data