Commit Graph

5 Commits

Author SHA1 Message Date
ef05a6523d Apply ruff formatting and fix unused import linting errors
Remove unused imports flagged by ruff (F401), apply ruff format across all
files, and restore members.signals side-effect import with noqa: F401 so the
post_save signal that auto-creates Member profiles continues to fire.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 08:55:28 +02:00
6c0115d4a2 Add Team/TeamRole/TeamMembership/TeamPicture models and fix two test bugs
- Fix Member.create(): post_save signal creates Member immediately on User creation,
  so new users always hit the hasattr branch; check `created` flag to set initial
  password and notes for genuinely new users
- Fix Season.for_date(): replace get() with filter().order_by("-start_date").first()
  to handle overlapping seasons gracefully and raise DoesNotExist when none match
- Add TeamRole, Team, TeamMembership, TeamPicture models with rules permissions
- Add migration 0002 for new models
- Add test suites for members and teams covering all new model behaviour

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 08:53:05 +02:00
c95cb24ca7 Extend Season model: add generate_default method for creating seasons with configurable defaults, and _add_months utility for date calculations. 2026-04-26 22:01:32 +02:00
03ed9c74b0 Add Season model to teams app: define fields, constraints, meta options, and utility methods for date range and current season tracking. 2026-04-18 16:01:38 +02:00
fb830710f2 Set up teams app: create app structure, register in settings, and update base template formatting. 2026-04-18 12:36:42 +02:00