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 })
def contract_count(): agencies = Agency.all().fetch(200) count = 0 for agency in agencies: count += agency.contract_count return count
def tagcloud(request): # get agencies sorted by contract_value agencies = Agency.all().order("name").fetch(200) return render_to_response('tagcloud.html', { 'agencies': agencies })