]> git.parisson.com Git - teleforma.git/commitdiff
goto 1.3, fix wifi user data export command
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 19 Jul 2018 14:03:01 +0000 (16:03 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 19 Jul 2018 14:03:01 +0000 (16:03 +0200)
teleforma/__init__.py
teleforma/management/commands/teleforma-export-wifi-accounts.py

index e22d48cb8a734572ecec9b8849c417bd280ccbe7..e2b3b9d6ca476e8ba133419e1d3cf438483db383 100644 (file)
@@ -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'
index f8a40f32706c9d8133c8d33c407ca10379a44023..9056ddf858d2ea4ac79155c58c829123a1451b02 100644 (file)
@@ -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()