def __call__(self, request, *args, **kwargs):
        """ Makes Events callable for easy use in your urls.py """
        try:
            obj = self.get_object(request, *args, **kwargs)
        except ObjectDoesNotExist:
            raise Http404('Events object does not exist.')
        ical = self.get_ical(obj, request)
        response = HttpResponse(ical.serialize(),
            content_type='text/calendar;charset=' + settings.DEFAULT_CHARSET)
        filename = self.__get_dynamic_attr('filename', obj)
        # following added for IE, see
        # http://blog.thescoop.org/archives/2007/07/31/django-ical-and-vobject/
        response['Filename'] = filename 
        response['Content-Disposition'] = 'attachment; filename=%s' % filename
        return response
dataset/ETHPy150Open statesofpop/django-cal/django_cal/views.py/Events.__call__/original