def job_map_search_list(requests): data = get_form(requests) job = jobAPI() if data['flag'] == True: job.scrapping_jobkorea_search(data) if job.db.keyword.count() != 0: job.db.keyword.drop() job.db.keyword.insert_one(data) with MongoClient('mongodb://192.168.0.134:8088') as client: Jobdata = client.Jobinfo contact_list = list( Jobdata.Joblist2.find()) # get Collection with find() page_obj, maxpage, minpage = paging(requests, contact_list) data['page_obj'] = page_obj data['maxpage'] = maxpage data['minpage'] = minpage return render(requests, 'jobMap/job_map_search_list.html', context=data)
def job_map_all(requests): data = get_form(requests) job = jobAPI() m = job.get_allmap_heat(data) datas = {'mountain_map': m, 'data': data} return render(requests, 'jobMap/job_map_all.html', context=datas)
def job_map_search_cluster(requests): data = get_form(requests) job = jobAPI() m = job.get_searchmap_cluster(data) datas = {'mountain_map': m, 'data': data} return render(requests, 'jobMap/job_map_search.html', context=datas)