Created
April 13, 2011 19:12
-
-
Save Ell/918183 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if request.method == 'GET': | |
id = request.GET['id'] | |
tagging = Images.objects.get(id=id) | |
tags = Tag.objects.usage_for_model(tagging, counts=True) | |
usageNum = [{"tag": tagfreq.name, "count": tagfreq.count} for tagfreq in tags] | |
dump = simplejson.dumps(usageNum) | |
message = dump | |
$("#tagcloud").tagCloud(tags); | |
var tags = $.getJSON('/tags/', | |
{ | |
id: {{ image.id }}, | |
}, | |
function(data) { | |
console.log(data); | |
tags = data; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment