From dd2b148e9bd0d1cdf59691a7a9c4eac4e40acdc0 Mon Sep 17 00:00:00 2001 From: Youta EGUSA Date: Wed, 25 Sep 2019 11:21:19 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E3=82=A2=E3=83=AA=E3=83=90=E3=83=90?= =?UTF-8?q?=E3=82=AF=E3=83=A9=E3=82=A6=E3=83=89=E3=82=A2=E3=82=AB=E3=82=A6?= =?UTF-8?q?=E3=83=B3=E3=83=88=E8=A8=AD=E5=AE=9A=E3=82=92=E9=9D=9E=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- isucon/portal/contest/forms.py | 7 ++----- .../contest/templates/team_settings.html | 20 ------------------- isucon/portal/templates/include/layout.html | 9 --------- 3 files changed, 2 insertions(+), 34 deletions(-) diff --git a/isucon/portal/contest/forms.py b/isucon/portal/contest/forms.py index ee06a40..5b16ac8 100644 --- a/isucon/portal/contest/forms.py +++ b/isucon/portal/contest/forms.py @@ -7,8 +7,6 @@ from isucon.portal.authentication.models import Team, User from isucon.portal.contest.models import Server -alibaba_account_validator = RegexValidator(r'^\d{16}$', "Invalid Account ID Format") - def global_ip_validator(value): try: address = ipaddress.ip_address(value) @@ -31,7 +29,7 @@ def private_ip_validator(value): class TeamForm(forms.ModelForm): class Meta: model = Team - fields = ("name", "participate_at", "alibaba_account", ) + fields = ("name", "participate_at", ) participate_at = forms.DateField( label="参加日選択", @@ -39,7 +37,6 @@ class Meta: widget=forms.Select(choices=Team.PARTICIPATE_AT_CHOICES), required=True, ) - alibaba_account = forms.CharField(required=False, validators=[alibaba_account_validator], ) def __init__(self, *args, **kwargs): self.is_registration_available = is_registration_available() @@ -112,7 +109,7 @@ def __init__(self, *args, **kwargs): def clean(self): cleaned_data = super().clean() - + if Server.objects.filter(team=self.team).count() >= 3: raise forms.ValidationError("すでに3台登録されています") diff --git a/isucon/portal/contest/templates/team_settings.html b/isucon/portal/contest/templates/team_settings.html index 58931a6..af5f7dd 100644 --- a/isucon/portal/contest/templates/team_settings.html +++ b/isucon/portal/contest/templates/team_settings.html @@ -113,26 +113,6 @@

Information

{% endif %} - {% if is_registration_available and not is_now_on_contest %} - {{ form.alibaba_account.as_hidden }} - {% else %} -
-
- -
-
-
-

- {{ form.alibaba_account|add_class:"input" }} -

- {% if form.alibaba_account.errors %} -

{{ form.alibaba_account.errors.0 }}

- {% endif %} -
- -
-
- {% endif %} diff --git a/isucon/portal/templates/include/layout.html b/isucon/portal/templates/include/layout.html index d85d535..f0d7784 100644 --- a/isucon/portal/templates/include/layout.html +++ b/isucon/portal/templates/include/layout.html @@ -72,15 +72,6 @@ {% endfor %} - - {% if user.team and not user.team.alibaba_account and not is_registration_available %} -
-
- Alibaba CloudのAccount IDが設定されていません。Team Settingsから設定してください。 -
-
- {% endif %} - {% if user.team and is_now_on_contest and servers.count == 0 %}
From ec6a92d5d62a967e011b98534a41409699cf01da Mon Sep 17 00:00:00 2001 From: Youta EGUSA Date: Wed, 25 Sep 2019 11:23:41 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BA=8B=E5=89=8D=E5=9B=9E=E7=AD=94?= =?UTF-8?q?=E4=BC=9A=E7=94=A8=E9=96=8B=E5=82=AC=E6=99=82=E9=96=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- isucon/portal/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isucon/portal/settings.py b/isucon/portal/settings.py index 6aaacd2..3424e51 100644 --- a/isucon/portal/settings.py +++ b/isucon/portal/settings.py @@ -200,7 +200,7 @@ # 時刻 CONTEST_START_TIME = portal_utils.get_jst_time(10, 0, 0) -CONTEST_END_TIME = portal_utils.get_jst_time(18, 0, 0) +CONTEST_END_TIME = portal_utils.get_jst_time(23, 0, 0) # FIXME: 事前回答会 # Result SHOW_RESULT_AFTER = portal_utils.get_jst_datetime(2019, 10, 5, 22, 0, 0) From e349c26435add626d0760c430a9d9dd56d8db2a9 Mon Sep 17 00:00:00 2001 From: Youta EGUSA Date: Wed, 25 Sep 2019 11:29:18 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E3=82=B9=E3=82=B3=E3=82=A2=E3=82=92?= =?UTF-8?q?=EF=BD=B2=EF=BD=BD=EF=BD=BA=EF=BD=B2=EF=BE=9D=E3=81=8B=E3=82=89?= =?UTF-8?q?=E7=82=B9=E6=95=B0=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contest/result/templates/result/dashboard.html | 8 ++++---- isucon/portal/contest/templates/dashboard.html | 8 ++++---- .../templates/includes/job_detail_part.html | 4 ++-- isucon/portal/contest/templates/jobs.html | 4 ++-- isucon/portal/contest/templates/scores.html | 14 +++++++------- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/isucon/portal/contest/result/templates/result/dashboard.html b/isucon/portal/contest/result/templates/result/dashboard.html index 97982cf..0d2d583 100644 --- a/isucon/portal/contest/result/templates/result/dashboard.html +++ b/isucon/portal/contest/result/templates/result/dashboard.html @@ -32,8 +32,8 @@ Rank Id Name - Latest Total transaction [ISUCOIN] - Best Total transaction [ISUCOIN] + Latest Score + Best Score FinishTime @@ -43,8 +43,8 @@ {{ forloop.counter }} {{ score.team.id }} {{ score.team }} - {{ score.latest_score|intcomma }} イスコイン - {{ score.best_score|intcomma }} イスコイン + {{ score.latest_score|intcomma }} + {{ score.best_score|intcomma }} {{ score.latest_scored_at|date:"H:i:s" }} {% endfor %} diff --git a/isucon/portal/contest/templates/dashboard.html b/isucon/portal/contest/templates/dashboard.html index 10c0cfb..2a234ba 100644 --- a/isucon/portal/contest/templates/dashboard.html +++ b/isucon/portal/contest/templates/dashboard.html @@ -43,8 +43,8 @@ Rank Id Name - Latest Total transaction [ISUCOIN] - Best Total transaction [ISUCOIN] + Latest Score + Best Score FinishTime @@ -54,8 +54,8 @@ {{ forloop.counter }} {{ score.team.id }} {{ score.team }} - {{ score.latest_score|intcomma }} イスコイン - {{ score.best_score|intcomma }} イスコイン + {{ score.latest_score|intcomma }} + {{ score.best_score|intcomma }} {{ score.latest_scored_at|date:"H:i:s" }} {% endfor %} diff --git a/isucon/portal/contest/templates/includes/job_detail_part.html b/isucon/portal/contest/templates/includes/job_detail_part.html index 7b9d0e4..93c5b24 100644 --- a/isucon/portal/contest/templates/includes/job_detail_part.html +++ b/isucon/portal/contest/templates/includes/job_detail_part.html @@ -22,10 +22,10 @@ {{ job.target_ip }} - Total transaction [ISUCOIN] + Total Score {% if job.is_finished %} - {{ job.score|intcomma }} イスコイン + {{ job.score|intcomma }} {% endif %} diff --git a/isucon/portal/contest/templates/jobs.html b/isucon/portal/contest/templates/jobs.html index 2ef5f49..5edc194 100644 --- a/isucon/portal/contest/templates/jobs.html +++ b/isucon/portal/contest/templates/jobs.html @@ -34,7 +34,7 @@ Lang {% endif %} JobId - Total transaction [ISUCOIN] + Total Score Status Result UpdatedAt @@ -53,7 +53,7 @@ {{ job.id }} {% if job.is_finished %} - {{ job.score|intcomma }} イスコイン + {{ job.score|intcomma }} {% endif %} diff --git a/isucon/portal/contest/templates/scores.html b/isucon/portal/contest/templates/scores.html index d7a08cb..c534690 100644 --- a/isucon/portal/contest/templates/scores.html +++ b/isucon/portal/contest/templates/scores.html @@ -37,9 +37,9 @@ Rank Id Name - Latest Total transaction [ISUCOIN] + Latest Total Score Time - Best Total transaction [ISUCOIN] + Best Total Score Time @@ -49,9 +49,9 @@ {{ forloop.counter }} {{ score.team.id }} {{ score.team }} - {{ score.latest_score|intcomma }} イスコイン + {{ score.latest_score|intcomma }} {{ score.latest_scored_at|date:"H:i:s" }} - {{ score.best_score|intcomma }} イスコイン + {{ score.best_score|intcomma }} {{ score.best_scored_at|date:"H:i:s" }} {% endfor %} @@ -60,9 +60,9 @@ - {{ score.team.id }} {{ score.team }} - {{ score.latest_score|intcomma }} イスコイン + {{ score.latest_score|intcomma }} {{ score.latest_scored_at|date:"H:i:s" }} - {{ score.best_score|intcomma }} イスコイン + {{ score.best_score|intcomma }} {{ score.best_scored_at|date:"H:i:s" }} {% endfor %} @@ -87,4 +87,4 @@ } {% endif %} -{% endblock script %} \ No newline at end of file +{% endblock script %} From 0b2129c4ffa18683fdecd67ae797a1ed7b5a8cee Mon Sep 17 00:00:00 2001 From: chibiegg Date: Wed, 25 Sep 2019 23:03:17 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9C=AC=E6=88=A6=E3=81=AE=E6=99=82?= =?UTF-8?q?=E9=96=93=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- isucon/portal/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isucon/portal/settings.py b/isucon/portal/settings.py index 3424e51..6aaacd2 100644 --- a/isucon/portal/settings.py +++ b/isucon/portal/settings.py @@ -200,7 +200,7 @@ # 時刻 CONTEST_START_TIME = portal_utils.get_jst_time(10, 0, 0) -CONTEST_END_TIME = portal_utils.get_jst_time(23, 0, 0) # FIXME: 事前回答会 +CONTEST_END_TIME = portal_utils.get_jst_time(18, 0, 0) # Result SHOW_RESULT_AFTER = portal_utils.get_jst_datetime(2019, 10, 5, 22, 0, 0)