Beispiel #1
0
def ResultsByJD(request):   
    rank = 1
    JD="NONE"
    if request.GET['q'] == "Job Description for DataBase Architect.doc":
        JD="DB2"
    if request.GET['q'] == "Job Description for Teradata Developer.docx":    
        JD="TD"
    PrimaryTech = "NONE"
    PrimaryRole = "NONE"
    AddSkill1   = "NONE"    
    if 'q' in request.GET:
        y = 0
    if JD=="TD":
        PrimaryTech = "Teradata"
        PrimaryRole = "Developer"
        AddSkill1   = "NONE"
    if JD=="DB2":
        PrimaryTech = "DB2"
        PrimaryRole = "Architect"
        AddSkill1   = "NONE"    
    if JD=="NONE":
        PrimaryTech = "NONE"
        PrimaryRole = "NONE"
        AddSkill1   = "NONE"    
    html_candidates = []
    values = kdd.sorted_data(PrimaryTech,PrimaryRole,AddSkill1)
    for x in values[0:]:
        html_candidates.append((rank,x[0],x[1],x[2],x[3],x[4],x[5],x[6]))
        #html_candidates.append((rank,x[0][x[0].find("/")+1:],x[1],x[2],x[3],x[4],x[5],x[6]))
        rank=rank+1
    t = get_template('results.html')
    html = t.render(Context({'html_candidates':html_candidates}))    
    return HttpResponse(html)     
Beispiel #2
0
def results(request):   
    if 'q' in request.GET:
        y = 0
        rank = 1
        PrimaryTech = "NONE"
        PrimaryRole = "NONE"
        AddSkill1   = "NONE"
        Location = "INDIA"
        parameters = []
        inputs = request.GET['q'].split()
        for x in inputs:
            y = y+1
        if y == 0: 
            return HttpResponse("NO SEARCH CRITERIA PROVIDED")
        parameters = kdd.find_params(request.GET['q'])
        PrimaryTech = parameters[0]
        AddSkill1   = parameters[1]
        PrimaryRole = parameters[2]
        Location    = parameters[3]
        html_candidates = []
#        resume_numbers = []
        values = kdd.sorted_data(PrimaryTech.upper(),PrimaryRole.upper(),AddSkill1.upper(),Location.upper())
        for x in values[0:]:
            html_candidates.append((rank,x[0],x[1],x[2],x[3],x[4],x[5],x[6]))
#            resume_numbers.append(x[0])
            rank = rank+1
        t = get_template('results.html')
        html = t.render(Context({'html_candidates':html_candidates}))    
        return HttpResponse(html)     
Beispiel #3
0
def ResultsByProfile(request):   
    rank = 1
    Profile="NONE"
    if request.GET['q'] == "KoteswarN.docx":
        Profile="Android"
    if request.GET['q'] == "VijayP.docx":    
        Profile="BI"
    PrimaryTech = "NONE"
    PrimaryRole = "NONE"
    AddSkill1   = "NONE"    
    if 'q' in request.GET:
        y = 0
    if Profile=="Android":
        PrimaryTech = "Android"
        PrimaryRole = "Developer"
        AddSkill1   = "NONE"
    if Profile=="BI":
        PrimaryTech = "BI"
        PrimaryRole = "Developer"
        AddSkill1   = "NONE"    
    html_candidates = []
    values = kdd.sorted_data(PrimaryTech,PrimaryRole,AddSkill1)
    for x in values[0:]:
        html_candidates.append((rank,x[0],x[1],x[2],x[3],x[4],x[5],x[6]))
        rank = rank+1
        t = get_template('results.html')
        html = t.render(Context({'html_candidates':html_candidates}))    
        return HttpResponse(html)     
Beispiel #4
0
def results2(request):   
    if 'q' in request.GET:
        y = 0
        rank = 1
        PrimaryTech = "NONE"
        PrimaryRole = "NONE"
        AddSkill1   = "NONE"
        inputs = request.GET['q'].split()
        for x in inputs:
            y = y+1
        if y == 0: 
            return HttpResponse("NO SEARCH CRITERIA PROVIDED")
        if y == 2:    
            PrimaryTech = inputs[0] 
            PrimaryRole = inputs[1]
            AddSkill1   = "NONE"    
        if y == 4:    
            PrimaryTech = inputs[0] 
            PrimaryRole = inputs[1]
            AddSkill1   = inputs[3]
        html_candidates = []
        values = kdd.sorted_data(PrimaryTech.upper(),PrimaryRole.upper(),AddSkill1.upper())
        for x in values[0:]:
            html_candidates.append((rank,x[0],x[1],x[2],x[3],x[4],x[5],x[6]))
            rank = rank+1
        t = get_template('results.html')
#       html = t.render(Context({'html_candidates':html_candidates}))
        html = t.render(Context({'html_candidates':html_candidates}))    
        return HttpResponse(html)