|
|
|
|
@ -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='razmig').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!') |
|
|
|
|
|
|
|
|
|
|