Пример #1
0
def company_singular_greek(request, company):
	helper = RelayFunctions()

	cool = helper.company_greek_candles(company)

	response = json.dumps(cool)
	return HttpResponse(response, mimetype="application/json")
Пример #2
0
def all_company_greek_candles(request):
	helper = RelayFunctions()

	all_company_greek_candles = []

	for company in Company.objects.filter(company_type = 'GT'):
			all_company_greek_candles.append(helper.company_greek_candles(model_to_dict(company)['id']))

	newlist = sorted(all_company_greek_candles, key=itemgetter('company_candles_total'), reverse = True)

	response = json.dumps(newlist)
	return HttpResponse(response, mimetype="application/json")