Show More
@@ -7,6 +7,8 b' from django.db.models import Count' | |||
|
7 | 7 | MAX_TAG_FONT = 1 |
|
8 | 8 | MIN_TAG_FONT = 0.2 |
|
9 | 9 | |
|
10 | TAG_POPULARITY_MULTIPLIER = 10 | |
|
11 | ||
|
10 | 12 | OPENING_POST_POPULARITY = 0.1 |
|
11 | 13 | REPLY_POPULARITY = 0.005 |
|
12 | 14 | ARCHIVE_POPULARITY_MODIFIER = 0.1 |
@@ -82,7 +84,8 b' class Tag(models.Model):' | |||
|
82 | 84 | |
|
83 | 85 | popularity = self.get_popularity() |
|
84 | 86 | |
|
85 | font_value = MIN_TAG_FONT + popularity | |
|
87 | font_value = popularity * TAG_POPULARITY_MULTIPLIER | |
|
88 | font_value = max(font_value, MIN_TAG_FONT) | |
|
86 | 89 | font_value = min(font_value, MAX_TAG_FONT) |
|
87 | 90 | |
|
88 | 91 | return str(font_value) |
General Comments 0
You need to be logged in to leave comments.
Login now