heroku
This commit is contained in:
parent
391ac1beaa
commit
3e2d92afde
|
@ -13,12 +13,12 @@ import math
|
|||
|
||||
|
||||
def cloud():
|
||||
min_font = 11
|
||||
max_font = 28
|
||||
#size = max(min_font, round((min_font+(tag_list[i]-min_w)*step)*(math.log(tag_list[i])/Math.log(max_w))))
|
||||
v = Tag.objects.all().annotate(c = Count('post')).filter(c__gt = 0).aggregate(Min('c'), Max('c'))
|
||||
max_tag, min_tag = v["c__max"], v["c__min"]
|
||||
step = (max_font - min_font)/float(max_tag-min_tag)
|
||||
# min_font = 11
|
||||
# max_font = 28
|
||||
# #size = max(min_font, round((min_font+(tag_list[i]-min_w)*step)*(math.log(tag_list[i])/Math.log(max_w))))
|
||||
# v = Tag.objects.all().annotate(c = Count('post')).filter(c__gt = 0).aggregate(Min('c'), Max('c'))
|
||||
# max_tag, min_tag = v["c__max"], v["c__min"]
|
||||
# step = (max_font - min_font)/float(max_tag-min_tag)
|
||||
#print step
|
||||
"""
|
||||
tags = Tag.objects.all().annotate(
|
||||
|
|
Loading…
Reference in New Issue
Block a user