Files
TimeTracker/app
Dries Peeters 89141108d9 Fix: Add missing timeago template filter causing 500 error
The Time Entry Templates page (/templates) was throwing a 500 error
when displaying templates with usage data. The templates referenced
a 'timeago' Jinja2 filter that was never registered.

Changes:
- Added timeago filter to app/utils/template_filters.py
  - Converts datetime to human-readable relative time (e.g., "2 hours ago")
  - Handles None, naive/aware datetimes, and future dates gracefully
  - Provides appropriate granularity from seconds to years
  - Uses proper singular/plural forms

- Added 11 comprehensive unit tests in tests/test_utils.py
  - Tests for None values, all time ranges, edge cases
  - Tests for naive datetimes and future dates
  - Tests for singular/plural formatting

- Added smoke test in tests/test_time_entry_templates.py
  - Specifically tests templates with usage_count and last_used_at
  - Ensures the filter renders correctly in the template

The filter is used in:
- app/templates/time_entry_templates/list.html (line 96)
- app/templates/time_entry_templates/edit.html (line 140)

Fixes #151
2025-10-25 06:53:13 +02:00
..
2025-10-24 17:08:42 +02:00
2025-10-24 16:53:30 +02:00
2025-10-24 15:03:34 +02:00
2025-10-21 20:03:21 +02:00