feat(trends): add 7-day period option

Add 'last_7' (Last 7 days) as a selectable period for all trends.
Changes are minimal since the period system is driven by PERIOD_CHOICES
and PERIOD_DAYS dicts — the rest of the infrastructure (views, templates,
Celery tasks, management commands) picks it up automatically.

- Add ('last_7', 'Last 7 days') to PERIOD_CHOICES in models.py
- Add 'last_7': 7 to PERIOD_DAYS in utils.py
- Migration 0004_alter_trendresult_period_add_last_7
This commit is contained in:
2026-07-19 15:43:08 -04:00
parent bb63e529e7
commit a598562e24
4 changed files with 34 additions and 1 deletions

View File

@ -88,7 +88,7 @@ fetching and simple saving.
*** Metadata sources
**** Scraper
* Backlog [0/23] :vrobbler:project:personal:
* Backlog [1/25] :vrobbler:project:personal:
** TODO [#C] After transition to linux add curl_cffi as webpage scrapper again :webpages:metadata:
** TODO [#C] Create small utility to clean up tracks scrobbled with wonky playback times :bug:music:scrobbles:
:PROPERTIES:
@ -601,6 +601,10 @@ The Edit log form should have from top to bottom:
*** Description
** TODO [#A] Add trends tests for concurrent trends :trends:tests:concurrent:
** DONE [#B] Add 7-day period for trends :trends:
:PROPERTIES:
:ID: 95731744-b0ec-175e-88dc-822cf9110292
:END:
* Version 61.3 [1/1]
** DONE [#A] Add trends tests and fix fasting :trends:tests:fasting:
:PROPERTIES: