[templates] Clean up chart displays
Some checks failed
build & deploy / test (push) Successful in 1m49s
build & deploy / deploy (push) Failing after 2m4s

This commit is contained in:
2026-04-02 10:54:16 -04:00
parent ce7128c7ac
commit 1bf558938d
14 changed files with 27 additions and 16 deletions

View File

@ -146,3 +146,8 @@ class ChartRecord(TimeStampedModel):
elif self.month:
date_str = f"{self.year}-{self.month:02d}"
return f"{url}?date={date_str}"
@property
def rank_emoji(self) -> str:
emojis = {1: "🥇", 2: "🥈", 3: "🥉"}
return emojis.get(self.rank, f"#{self.rank}")