From 7bbdb52b875a835b2415220764004fade3eba937 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 19 Jul 2018 16:03:01 +0200 Subject: [PATCH] goto 1.3, fix wifi user data export command --- teleforma/__init__.py | 2 +- .../commands/teleforma-export-wifi-accounts.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/teleforma/__init__.py b/teleforma/__init__.py index e22d48cb..e2b3b9d6 100644 --- a/teleforma/__init__.py +++ b/teleforma/__init__.py @@ -9,7 +9,7 @@ U{http://parisson.com/products/teleforma} """ __docformat__ = 'epytext en' -__version__ = '1.1' +__version__ = '1.3' __url__ = 'http://parisson.com/products/teleforma' __copyright__ = '(C) 2011-2017 Parisson' __license__ = 'CeCILL-v2' diff --git a/teleforma/management/commands/teleforma-export-wifi-accounts.py b/teleforma/management/commands/teleforma-export-wifi-accounts.py index f8a40f32..9056ddf8 100644 --- a/teleforma/management/commands/teleforma-export-wifi-accounts.py +++ b/teleforma/management/commands/teleforma-export-wifi-accounts.py @@ -28,7 +28,13 @@ class Command(BaseCommand): p = profile[0] student = students[0] if student.is_subscribed and user.is_active and student.period == period: - f.write(p.wifi_login + ',' + p.wifi_pass + '\n') - + data = [] + data.append(user.first_name) + data.append(user.last_name) + data.append(p.wifi_login) + data.append(p.wifi_pass) + data.append('\n') + s = ','.join(data) + f.write(s.encode('utf8')) f.close() -- 2.39.5