Skip to content

Instantly share code, notes, and snippets.

@psachin
Created June 17, 2014 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psachin/669ef49354eaf6721e5b to your computer and use it in GitHub Desktop.
Save psachin/669ef49354eaf6721e5b to your computer and use it in GitHub Desktop.
Kavleen
def index(request):
context=RequestContext(request)
# data=[]
categories=Category.objects.all()
for category in categories:
print "%s: %d percent" % (category, category.percent)
context_dict = {
'categories': categories,
}
return render_to_response('barchart/index.html',context_dict,context);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment