Skip to content

Commit

Permalink
add qualification list table for WRC 2025
Browse files Browse the repository at this point in the history
  • Loading branch information
unStatiK committed Feb 2, 2025
1 parent 9a38110 commit 12e8fc0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
18 changes: 18 additions & 0 deletions server/player/migrations/0016_alter_playerquotaevent_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.16 on 2025-02-02 14:57

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("player", "0015_player_is_exclude_from_rating"),
]

operations = [
migrations.AlterField(
model_name="playerquotaevent",
name="type",
field=models.PositiveSmallIntegerField(choices=[[0, "ERMC 2019"], [1, "WRC 2020"], [2, "WRC 2025"]]),
),
]
3 changes: 2 additions & 1 deletion server/player/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ class PlayerQuotaEvent(BaseModel):

ERMC_2019 = 0
WRC_2020 = 1
TYPES = [[ERMC_2019, "ERMC 2019"], [WRC_2020, "WRC 2020"]]
WRC_2025 = 2
TYPES = [[ERMC_2019, "ERMC 2019"], [WRC_2020, "WRC 2020"], [WRC_2025, "WRC 2025"]]

player = models.ForeignKey(Player, on_delete=models.CASCADE)
place = models.PositiveIntegerField(default=None, null=True, blank=True)
Expand Down
2 changes: 1 addition & 1 deletion server/templates/website/wrc_2025.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h2>{% trans 'World Riichi Championship 2025 Qualifications' %}</h2>
<p>{% trans 'List of players sorted by RR rating (on 3st February 2025)' %}</p>
{% endif %}

<!-- {% include 'website/_qualification_2025_table.html' %} -->
{% include 'website/_qualification_2025_table.html' %}

</div>
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion server/website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def wrc_qualification_2020(request):


def wrc_qualification_2025(request):
return qualification_view(request, PlayerQuotaEvent.WRC_2020, "website/wrc_2025.html")
return qualification_view(request, PlayerQuotaEvent.WRC_2025, "website/wrc_2025.html")


def qualification_view(request, q_type, template):
Expand Down

0 comments on commit 12e8fc0

Please sign in to comment.