Show More
@@ -58,7 +58,7 b' class Tag(models.Model):' | |||||
58 | modifier = 1 |
|
58 | modifier = 1 | |
59 | tag_reply_count += thread.get_reply_count() * modifier |
|
59 | tag_reply_count += thread.get_reply_count() * modifier | |
60 |
|
60 | |||
61 | popularity = tag_reply_count / all_post_count |
|
61 | popularity = tag_reply_count / all_post_count / thread.tags.all().count() | |
62 |
|
62 | |||
63 | return popularity |
|
63 | return popularity | |
64 |
|
64 | |||
@@ -86,7 +86,7 b' class Tag(models.Model):' | |||||
86 |
|
86 | |||
87 | popularity = self.get_popularity() |
|
87 | popularity = self.get_popularity() | |
88 |
|
88 | |||
89 |
font_value = popularity * Tag.objects. |
|
89 | font_value = popularity * Tag.objects.get_not_empty_tags().count() | |
90 | font_value = max(font_value, MIN_TAG_FONT) |
|
90 | font_value = max(font_value, MIN_TAG_FONT) | |
91 | font_value = min(font_value, MAX_TAG_FONT) |
|
91 | font_value = min(font_value, MAX_TAG_FONT) | |
92 |
|
92 |
General Comments 0
You need to be logged in to leave comments.
Login now