|
|
|
|
@ -499,9 +499,12 @@ def download(request): |
|
|
|
|
return render(request, 'tournaments/download.html') |
|
|
|
|
|
|
|
|
|
def test_apns(request): |
|
|
|
|
token = DeviceToken.objects.first() |
|
|
|
|
|
|
|
|
|
asyncio.run(send_push_notification(token.value, 'hello!')) |
|
|
|
|
user = CustomUser.objects.filter(username='laurent').first() |
|
|
|
|
for device_token in user.devicetoken_set.all(): |
|
|
|
|
asyncio.run(send_push_notification(device_token.value, 'LOL?!')) |
|
|
|
|
|
|
|
|
|
# token = DeviceToken.objects.first() |
|
|
|
|
|
|
|
|
|
return HttpResponse('OK!') |
|
|
|
|
|
|
|
|
|
@ -897,8 +900,8 @@ class UserListExportView(LoginRequiredMixin, View): |
|
|
|
|
|
|
|
|
|
# Write header |
|
|
|
|
headers = [ |
|
|
|
|
'Prenom', 'Nom', 'Club', 'Email', 'Telephone', |
|
|
|
|
'origine', 'Actif', 'Inscription', 'Tournois' |
|
|
|
|
'Prenom', 'Nom', 'Club', 'Email', 'Telephone', 'Username', |
|
|
|
|
'Origine', 'Actif', 'Inscription', 'Tournois' |
|
|
|
|
] |
|
|
|
|
response.write('\t'.join(headers) + '\n') |
|
|
|
|
|
|
|
|
|
@ -910,6 +913,7 @@ class UserListExportView(LoginRequiredMixin, View): |
|
|
|
|
str(user.latest_event_club_name() or ''), |
|
|
|
|
str(user.email or ''), |
|
|
|
|
str(user.phone or ''), |
|
|
|
|
user.username, |
|
|
|
|
str(user.get_origin_display()), |
|
|
|
|
'Oui' if user.is_active else 'Non', |
|
|
|
|
user.date_joined.strftime('%Y-%m-%d %H:%M:%S'), |
|
|
|
|
|