コード例 #1
0
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")
コード例 #2
0
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")