def getIndustryList(): orgDetails = orgData() IndustryList = [] for industry in orgDetails: IndustryList.append(industry.org_primaryindustry) print(IndustryList) return IndustryList
def organisation(): OrgDetails, orgCount, empCount = getOrgAndEmpCount() orgDetails = orgData() IndustryList = [] for industry in orgDetails: IndustryList.append(industry.org_primaryindustry) uniqueIndustryList = list(set(IndustryList)) geographyList = [] for geography in orgDetails: geographyList.append(geography.hq_country) uniqueCountryList = list(set(geographyList)) revenue = getMaxAndMinRevenue() if request.method == 'POST': formData = request.form print('org form---------------', formData) searchRes = searchData(formData) print(type(searchRes)) if len(searchRes) == 0: print("No result found!!") OrgDetails = searchRes else: print('ppppppp', searchRes) OrgDetails = searchRes return render_template('organisation.html', recCount=OrgDetails, orgCount=orgCount, empCount=empCount, industryList=uniqueIndustryList, geographyList=uniqueCountryList)
def getCompanyList(): # import pdb; pdb.set_trace() keyword = request.form.get('companyname') orgDetails = orgData() companyNames = [] for company in orgDetails: companyNames.append(company.org_name) return Response(json.dumps(companyNames), mimetype='application/json')
def getGeographyList(): orgDetails = orgData() geographyList = [] for geography in orgDetails: geographyList.append(geography.hq_country) return Response(json.dumps(geographyList), mimetype='application/json')