From: Guillaume Pellerin Date: Mon, 9 Jan 2017 22:14:03 +0000 (+0100) Subject: Try to fix encoding X-Git-Tag: 1.1~50 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=aa8eb6243f3d673ff95035bdbcd8e919e5609a6d;p=teleforma.git Try to fix encoding --- diff --git a/teleforma/views/crfpa.py b/teleforma/views/crfpa.py index f680a991..f683ed31 100644 --- a/teleforma/views/crfpa.py +++ b/teleforma/views/crfpa.py @@ -219,8 +219,8 @@ class UserXLSBook(object): if student.training or student.trainings.all(): student = Student.objects.get(user=user) row = self.sheet.row(counter + self.first_row) - row.write(0, user.last_name) - row.write(1, user.first_name) + row.write(0, user.last_name.encode('utf8')) + row.write(1, user.first_name.encode('utf8')) row.write(9, user.email) row.write(2, unicode(student.iej)) @@ -242,9 +242,9 @@ class UserXLSBook(object): student = Student.objects.get(user=user) if profile: profile = Profile.objects.get(user=user) - row.write(10, profile.address) + row.write(10, profile.address.encode('utf8')) row.write(11, profile.postal_code) - row.write(12, profile.city) + row.write(12, profile.city.encode('utf8')) row.write(13, profile.telephone) if student.date_subscribed: row.write(14, student.date_subscribed.strftime("%d/%m/%Y"))