From bfdd0872824a55b2daa3e6caade8a951062f9feb Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Sun, 16 Aug 2026 19:20:55 +0800 Subject: [PATCH] feat: show "Not on PyPI" badge for missing download counts Replaces the em dash in the PyPI Downloads column with a source-badge pill labeled "Not on PyPI", reusing the existing badge style used by the stars column for visual consistency. Sorting is unaffected since non-numeric cells already parse as missing. Co-Authored-By: Claude --- website/templates/category.html | 5 ++++- website/templates/index.html | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/website/templates/category.html b/website/templates/category.html index 4077db61..e29e2f17 100644 --- a/website/templates/category.html +++ b/website/templates/category.html @@ -155,7 +155,10 @@ {% if entry.downloads is not none %}{{ - "{:,}".format(entry.downloads) }}{% else %}—{% endif %} + "{:,}".format(entry.downloads) }}{% else %}Not on PyPI{% endif %} {% if entry.stars is not none %}{{ "{:,}".format(entry.stars) }}{% diff --git a/website/templates/index.html b/website/templates/index.html index ac243c9b..0bac1446 100644 --- a/website/templates/index.html +++ b/website/templates/index.html @@ -206,7 +206,10 @@ {% if entry.downloads is not none %}{{ - "{:,}".format(entry.downloads) }}{% else %}—{% endif %} + "{:,}".format(entry.downloads) }}{% else %}Not on PyPI{% endif %} {% if entry.stars is not none %}{{ "{:,}".format(entry.stars) }}{%