Subversion Repositories SmartDukaan

Rev

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

Rev 17280 Rev 17281
Line 1672... Line 1672...
1672
    payload["notification_campaign_id"]= campaignId
1672
    payload["notification_campaign_id"]= campaignId
1673
    payload["status"]=0
1673
    payload["status"]=0
1674
    
1674
    
1675
    payloadList = []
1675
    payloadList = []
1676
    payloadList.append(payload)
1676
    payloadList.append(payload)
1677
    jsonObj = json.dumps(payloadList)
1677
    jsonObj = json.dumps([dict(pn) for pn in payloadList])
-
 
1678
    print jsonObj
1678
    pushpostrequest = urllib2.Request("http://45.33.50.227:3001/addPushNotification", jsonObj)
1679
    pushpostrequest = urllib2.Request("http://45.33.50.227:3001/addPushNotification")
-
 
1680
    pushpostrequest.add_header('Content-Type', 'application/json')
1679
    response = urllib2.urlopen(pushpostrequest).read()
1681
    response = urllib2.urlopen(pushpostrequest, jsonObj).read()
1680
    print response
1682
    print response
1681
        
1683
        
1682
def addNotificationCampaign(name, title, message, type, url, sql):
1684
def addNotificationCampaign(name, title, message, type, url, sql):
1683
    notificationCampaign = notification_campaigns()
1685
    notificationCampaign = notification_campaigns()
1684
    notificationCampaign.name = name
1686
    notificationCampaign.name = name