From adc6deb314e21d548865dbc402623f96b8d8724a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Tue, 6 Jan 2026 20:36:18 +0100 Subject: [PATCH] Improve importer, add channels and import both drop_campaigns and drop_campaign --- pyproject.toml | 1 + templates/twitch/dashboard.html | 8 +- .../commands/better_import_drops.py | 251 +++++++++++++++--- ...twitch_drop_is_acco_7e9078_idx_and_more.py | 23 ++ twitch/models.py | 5 - twitch/schemas.py | 131 +++++++-- twitch/tests/test_better_import_drops.py | 60 ++++- twitch/views.py | 6 +- 8 files changed, 404 insertions(+), 81 deletions(-) create mode 100644 twitch/migrations/0003_remove_dropcampaign_twitch_drop_is_acco_7e9078_idx_and_more.py diff --git a/pyproject.toml b/pyproject.toml index 5a57cd4..d0ae287 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,6 +88,7 @@ line-length = 120 "S106", "PLR6301", "S105", + "SLF001", ] "**/migrations/**" = ["RUF012"] diff --git a/templates/twitch/dashboard.html b/templates/twitch/dashboard.html index b8a6c96..87ade82 100644 --- a/templates/twitch/dashboard.html +++ b/templates/twitch/dashboard.html @@ -33,24 +33,24 @@ Hover over the end time to see the exact date and time. alt="Box art for {{ game_data.name }}" width="200" height="267" - style="border-radius: 8px"> + style="border-radius: 8px" />
{% for campaign in game_data.campaigns %} -
- + Image for {{ campaign.name }} + style="border-radius: 4px" />

{{ campaign.clean_name }}