Aktualisiert alle Kyu-/Dan Rankings mit einem einfachen Befehl in der Shell. random-ranking wurde gelöscht, es wird nicht mehr verwendet.
18 lines
356 B
Python
18 lines
356 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
Recalculate Mahjong Rankings...
|
|
"""
|
|
|
|
from django.core.management.base import BaseCommand
|
|
from mahjong_ranking import models
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = "Recalculate all Rankings"
|
|
|
|
def handle(self, *args, **options):
|
|
for ranking in models.KyuDanRanking.objects.all():
|
|
ranking.recalculate()
|
|
|