Skip to content

Commit

Permalink
fix: try to fix 500ing
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanB committed Oct 24, 2024
1 parent 5e82fd2 commit 4669187
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions home/templates/home/user_profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,33 @@ <h5>{{user.username}}#{{user.discriminator}}</h5>
</div>

{% if elos_by_game %}
{% for game_type, game_modes in elos_by_game.items|groupby:"game_mode.game" %}
<div class="row">
<div class="col-12">
<h2 class="bg-dark text-white p-3">{{ game_type }}</h2>
<table class="table table-dark table-striped table-hover table-sm">
<thead>
<tr>
<th>Mode</th>
<th>ELO</th>
<th>W-L-T</th>
</tr>
</thead>
<tbody>
{% for game_mode, elo in game_modes %}
<tr>
<td>{{ game_mode.name }}</td>
{% if elo %}
<td>{{ elo.elo|floatformat:1 }}</td>
<td>{{ elo.matches_won }}-{{ elo.matches_lost }}-{{ elo.matches_drawn }}</td>
{% else %}
<td colspan="2">Not Played</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endfor %}
<table class="table table-dark table-striped table-hover table-sm">
{% for game_type, modes in elos_by_game.items %}
<thead>
<tr>
<th colspan="3" scope="colgroup" class="bg-dark text-white text-center">{{ game_type }}</th>
</tr>
<tr>
<th scope="col">Mode</th>
<th scope="col">ELO</th>
<th scope="col">W-L-T</th>
</tr>
</thead>
<tbody>
{% for item in modes %}
<tr>
<td>{{ item.mode.name }}</td>
{% if item.elo %}
<td>{{ item.elo.elo|floatformat:1 }}</td>
<td>{{ item.elo.matches_won }}-{{ item.elo.matches_lost }}-{{ item.elo.matches_drawn }}</td>
{% else %}
<td colspan="2">Not Played</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
{% endfor %}
</table>
{% endif %}

<div class="row">
Expand Down

0 comments on commit 4669187

Please sign in to comment.