def advertiser_brandlock_keywords_singlelist(request,campId,kwgId): key = request.organization.brandlock_key bl = Brandlock(key) keywords = bl.list_keywords(campId,kwgId) return HttpResponse(keywords, mimetype="text/plain")
def advertiser_brandlock_keywords(request): idlist = request.POST.get('idlist') campaign = request.POST.get('campaign') idArray = idlist.split(",") print idArray options = "" key = request.organization.brandlock_key bl = Brandlock(key) for i in idArray: options += bl.list_keywords(campaign,i) options += "\n" options = options[:-1] print "JSON OBJECT -----" #sjsonObject = simplejson.JSONEncoder().encode(jsonObject) print options return HttpResponse(options, mimetype="text/plain")