feat(players): add origin competition/team model and filtering

This commit is contained in:
Alfredo Di Stasio
2026-03-10 12:29:38 +01:00
parent acfccbea08
commit 4d49d30495
14 changed files with 368 additions and 1 deletions

View File

@ -24,6 +24,8 @@
<div class="detail-card">
<h2>Summary</h2>
<p><strong>Nationality:</strong> {{ player.nationality.name|default:"-" }}</p>
<p><strong>Origin competition:</strong> {{ player.origin_competition.name|default:"-" }}</p>
<p><strong>Origin team:</strong> {{ player.origin_team.name|default:"-" }}</p>
<p><strong>Birth date:</strong> {{ player.birth_date|date:"Y-m-d"|default:"-" }}</p>
<p><strong>Age:</strong> {{ age|default:"-" }}</p>
<p><strong>Height:</strong> {{ player.height_cm|default:"-" }} cm</p>

View File

@ -42,6 +42,8 @@
<div><label for="id_competition">Competition</label>{{ search_form.competition }}</div>
<div><label for="id_team">Team</label>{{ search_form.team }}</div>
<div><label for="id_season">Season</label>{{ search_form.season }}</div>
<div><label for="id_origin_competition">Origin competition</label>{{ search_form.origin_competition }}</div>
<div><label for="id_origin_team">Origin team</label>{{ search_form.origin_team }}</div>
</div>
<details>

View File

@ -19,6 +19,7 @@
<th>Player</th>
<th>Nationality</th>
<th>Pos / Role</th>
<th>Origin</th>
<th>Height / Weight</th>
<th>Games</th>
<th>MPG</th>
@ -39,6 +40,10 @@
{{ player.nominal_position.code|default:"-" }}
/ {{ player.inferred_role.name|default:"-" }}
</td>
<td>
{{ player.origin_competition.name|default:"-" }}
{% if player.origin_team %}<br><span class="muted-text">{{ player.origin_team.name }}</span>{% endif %}
</td>
<td>{{ player.height_cm|default:"-" }} / {{ player.weight_kg|default:"-" }}</td>
<td>{{ player.games_played_value|floatformat:0 }}</td>
<td>{{ player.mpg_value|floatformat:1 }}</td>