def exportion_excel(self, request, mailinglist_id):
     """Export subscribers in the mailing in Excel"""
     mailinglist = get_object_or_404(MailingList, pk=mailinglist_id)
     name = 'contacts_%s' % smart_str(mailinglist.name)
     return ExcelResponse(mailinglist.subscribers.all(), name)
Пример #2
0
 def export_excel(self, request, queryset, export_name=''):
     """Export selected contact in Excel"""
     if not export_name:
         export_name = 'contacts_edn_%s' % datetime.now().strftime(
             '%d-%m-%Y')
     return ExcelResponse(queryset, export_name)
Пример #3
0
 def export_subscribers(self, request, mailinglist_id):
     """Export subscribers in the mailing in VCard"""
     mailinglist = get_object_or_404(MailingList, pk=mailinglist_id)
     name = 'contacts_%s' % mailinglist.name
     return ExcelResponse(mailinglist.subscribers.all(), output_name=name)