def export(self, response): redemptions_dict = self.redemptions_by_user writec(self, _("Last name"), "bold") writec(self, _("First name"), "bold") writec(self, _("Email address"), "bold") writec(self, _("Number of points"), "bold") for user, value in redemptions_dict.items(): writen(self, user.last_name, "default") writec(self, user.first_name, "default") writec(self, user.email, "default") writec(self, value, "default") self.workbook.save(response)
def export(self, response): redemptions_dict = self.redemptions_by_user self.workbook = xlwt.Workbook() self.sheet = self.workbook.add_sheet(_(u"Redemptions")) self.row = 0 self.col = 0 writec(self, _("Last name"), "bold") writec(self, _("First name"), "bold") writec(self, _("Email address"), "bold") writec(self, _("Number of points"), "bold") for user_profile, value in redemptions_dict.items(): writen(self, user_profile.user.last_name, "default") writec(self, user_profile.user.first_name, "default") writec(self, user_profile.user.email, "default") writec(self, value, "default") self.workbook.save(response)
def export(self, response): redemptions_dict = self.redemptions_by_user self.workbook = xlwt.Workbook() self.sheet = self.workbook.add_sheet(_("Redemptions")) self.row = 0 self.col = 0 writec(self, _("Last name"), "bold") writec(self, _("First name"), "bold") writec(self, _("Email address"), "bold") writec(self, _("Number of points"), "bold") for user, value in redemptions_dict.items(): writen(self, user.last_name, "default") writec(self, user.first_name, "default") writec(self, user.email, "default") writec(self, value, "default") self.workbook.save(response)