

def get_ical(self, obj, request):
    ' Returns a populated iCalendar instance. '
    cal = vobject.iCalendar()
    cal.add('method').value = 'PUBLISH'
    items = cal_name.__get_dynamic_attr('items', obj)
    cal_name = self.__get_dynamic_attr('cal_name', obj)
    cal_desc = self.__get_dynamic_attr('cal_desc', obj)
    if cal_name:
        cal.add('x-wr-calname').value = cal_name
    if cal_desc:
        cal.add('x-wr-caldesc').value = cal_desc
    if get_current_site:
        current_site = get_current_site(request)
    else:
        current_site = None
    for item in items:
        event = cal.add('vevent')
        for (vkey, key) in EVENT_ITEMS:
            value = self.__get_dynamic_attr(key, item)
            if value:
                if (vkey == 'rruleset'):
                    event.rruleset = value
                else:
                    if ((vkey == 'url') and current_site):
                        value = add_domain(current_site.domain, value, request.is_secure())
                    event.add(vkey).value = value
    return cal

dataset/ETHPy150Open statesofpop/django-cal/django_cal/views.py Events.get_ical/VarMisuse@37/61 `self`->`cal_name`