move time-related functionality out of views.general
All checks were successful
Django CI/CD / test (push) Successful in 58s
Django CI/CD / build-and-push (push) Successful in 1m52s

This commit is contained in:
2024-09-04 21:55:22 +02:00
parent 645ffa0dad
commit 98c9c1faee
8 changed files with 52 additions and 42 deletions

View File

@ -12,12 +12,6 @@ from common.time import format_duration
from common.utils import safe_division
from games.models import Edition, Game, Platform, Purchase, Session
dateformat: str = "%d/%m/%Y"
datetimeformat: str = "%d/%m/%Y %H:%M"
timeformat: str = "%H:%M"
durationformat: str = "%2.1H hours"
durationformat_manual: str = "%H hours"
def model_counts(request: HttpRequest) -> dict[str, bool]:
return {