Subversion Repositories SmartDukaan

Rev

Rev 15724 | Rev 15726 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15724 Rev 15725
Line 114... Line 114...
114
            post_data_json = json.dumps(post_data)
114
            post_data_json = json.dumps(post_data)
115
            print post_data_json
115
            print post_data_json
116
            
116
            
117
            response = requests.post(GCM_URL, data=post_data_json, headers=headers)
117
            response = requests.post(GCM_URL, data=post_data_json, headers=headers)
118
            print response.text
118
            print response.text
119
            result = response.text
119
            result = json.loads(response.text)
120
            pushnotification = Pushnotifications.get_by(id=notificationRecord.pushNotificationId)
120
            pushnotification = Pushnotifications.get_by(id=notificationRecord.pushNotificationId)
121
            
121
            
122
            if result["success"]:
122
            if result["success"]:
123
                pushnotification.type = "sent"
123
                pushnotification.type = "sent"
124
                pushnotification.status = True
124
                pushnotification.status = True