Rework an event's audience: replace the single team FK with a teams M2M plus invited_members and excluded_members, and add a season FK (derived from the start date when blank) so team rosters resolve correctly. A data migration copies existing team -> teams. Add an attendance sync service: the effective audience is the union of the teams' rosters for the event's season plus invited, minus excluded; sync_event_attendances reconciles Attendance rows for future events only, adding NO_RESPONSE rows for new members and hard-deleting rows for members no longer invited. Signals drive it: editing an event or its audience re-syncs that event, and adding/removing a team-roster member re-syncs that team's future events. Register all events models in the admin (with an attendance inline) and add events to the admin registration smoke test. Add Season.covering() and pillow (Opponent.logo ImageField). Full suite at 100% coverage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
48 lines
1.3 KiB
TOML
48 lines
1.3 KiB
TOML
[project]
|
|
name = "clubmanager"
|
|
version = "0.1.0"
|
|
requires-python = ">=3.14"
|
|
dependencies = [
|
|
"dj-database-url>=3.1.2",
|
|
"django>=6.0.6",
|
|
"django-phonenumber-field[phonenumbers]>=8.4.0",
|
|
"pillow>=12.3.0",
|
|
"python-decouple>=3.8",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"coverage>=7.15.0",
|
|
"ruff>=0.15.17",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 250
|
|
target-version = "py314"
|
|
# Auto-generated migrations are not hand-maintained code.
|
|
extend-exclude = ["**/migrations/*"]
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"UP", # pyupgrade
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"DJ", # flake8-django
|
|
"RUF", # ruff-specific rules
|
|
]
|
|
ignore = [
|
|
"RUF012", # Django/Wagtail model attrs (panels, Meta.ordering, ...) are framework conventions, not mutable defaults to guard.
|
|
"RUF005", # Wagtail's `Page.content_panels + [...]` concatenation is the documented idiom.
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# Settings legitimately use star imports and long generated values.
|
|
"clubmanager/settings/*" = ["F403", "F405", "E501"]
|
|
|
|
[tool.ruff.lint.isort]
|
|
known-first-party = ["authentication", "club", "members", "teams", "events", "news", "pages", "home", "search", "clubmanager"]
|