From: Guillaume Pellerin Date: Thu, 19 Jul 2018 14:03:01 +0000 (+0200) Subject: goto 1.3, fix wifi user data export command X-Git-Tag: 1.3.1~13 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=7bbdb52b875a835b2415220764004fade3eba937;p=teleforma.git goto 1.3, fix wifi user data export command --- 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()