Commit e19be046c263978ad74e8749322ea9c45a06a074

Authored by Rohan Rangray
1 parent f66dc6a912
Exists in master

Fixed weird gcm import issue

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

flashcards/models.py View file @ e19be04
... ... @@ -2,7 +2,7 @@
2 2 from math import exp
3 3 from datetime import timedelta
4 4  
5   -from gcm import GCM, gcm
  5 +from gcm import gcm
6 6 from django.contrib.auth.models import AbstractUser, UserManager
7 7 from django.contrib.auth.tokens import default_token_generator
8 8 from django.core.cache import cache
9 9  
... ... @@ -99,9 +99,9 @@
99 99 "noreply@flashy.cards", [self.email])
100 100  
101 101 def notify(self):
102   - gcm = GCM(GCM_API_KEY)
  102 + gcm_ctx = gcm.GCM(GCM_API_KEY)
103 103 try:
104   - gcm.plaintext_request(
  104 + gcm_ctx.plaintext_request(
105 105 registration_id=self.registration_id,
106 106 data={'poop': 'data'}
107 107 )