bracket-feature
Laurent 9 months ago
parent 5dd2ec63ed
commit eee120a789
  1. 7
      tournaments/views.py

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

Loading…
Cancel
Save