예제 #1
0
파일: tasks.py 프로젝트: goetzk/tendenci
 def run(self, **kwargs):
     if kwargs.get('ics'):
         ics = kwargs.get('ics')
         ics_str = create_ics(ics.user)
         response = HttpResponse(ics_str)
         response['Content-Type'] = 'text/calendar'
         response['Content-Disposition'] = 'attachment; filename="ics-%s.ics"' % (ics.user.pk)
         return response
예제 #2
0
 def run(self, **kwargs):
     if kwargs.get('ics'):
         ics = kwargs.get('ics')
         ics_str = create_ics(ics.user)
         response = HttpResponse(ics_str)
         response['Content-Type'] = 'text/calendar'
         response['Content-Disposition'] = 'attachment; filename="ics-%s.ics"' % (ics.user.pk)
         return response