Exemplo n.º 1
0
def tagcloud(request):
    # get agencies sorted by contract_value
	query = Agency.all().order("name")
	agencies = []
	for agency in query:
	    agency.weight = utils.tag_weight(agency.contract_value)
	    agencies.append(agency)
	return render_to_response('tagcloud.html', { 'agencies': agencies })
Exemplo n.º 2
0
def contract_count():
	agencies = Agency.all().fetch(200)
	count = 0
	for agency in agencies:
	    count += agency.contract_count
	return count
Exemplo n.º 3
0
def tagcloud(request):
    # get agencies sorted by contract_value
	agencies = Agency.all().order("name").fetch(200)
	return render_to_response('tagcloud.html', { 'agencies': agencies })