From 397f243c8224235ca86525273317787da1aa6208 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 8 May 2020 16:07:51 +0200 Subject: [PATCH] Remove wrong comments --- apps/api/__init__.py | 3 --- apps/api/apps.py | 3 --- apps/api/urls.py | 4 ---- apps/member/management/commands/create_su.py | 1 - apps/member/management/commands/import_olddb.py | 1 - apps/member/tests.py | 3 --- apps/tournament/forms.py | 4 ++-- apps/tournament/tests.py | 3 --- entrypoint.sh | 2 -- tfjm/inputs.py | 3 --- tfjm/middlewares.py | 3 --- 11 files changed, 2 insertions(+), 28 deletions(-) delete mode 100644 apps/member/tests.py delete mode 100644 apps/tournament/tests.py diff --git a/apps/api/__init__.py b/apps/api/__init__.py index 1b17aec..08884cb 100644 --- a/apps/api/__init__.py +++ b/apps/api/__init__.py @@ -1,4 +1 @@ -# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay -# SPDX-License-Identifier: GPL-3.0-or-later - default_app_config = 'api.apps.APIConfig' diff --git a/apps/api/apps.py b/apps/api/apps.py index 11d7865..fb08f6a 100644 --- a/apps/api/apps.py +++ b/apps/api/apps.py @@ -1,6 +1,3 @@ -# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay -# SPDX-License-Identifier: GPL-3.0-or-later - from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ diff --git a/apps/api/urls.py b/apps/api/urls.py index 9647aa6..b8f5c3e 100644 --- a/apps/api/urls.py +++ b/apps/api/urls.py @@ -1,13 +1,9 @@ -# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay -# SPDX-License-Identifier: GPL-3.0-or-later - from django.conf.urls import url, include from django_filters.rest_framework import DjangoFilterBackend from rest_framework import routers, serializers, status from rest_framework.filters import SearchFilter from rest_framework.response import Response from rest_framework.viewsets import ModelViewSet - from member.models import TFJMUser, Authorization, Solution, Synthesis, MotivationLetter from tournament.models import Team, Tournament, Pool diff --git a/apps/member/management/commands/create_su.py b/apps/member/management/commands/create_su.py index 9d7df58..a3fac35 100644 --- a/apps/member/management/commands/create_su.py +++ b/apps/member/management/commands/create_su.py @@ -1,7 +1,6 @@ import os from datetime import date from getpass import getpass - from django.core.management import BaseCommand from member.models import TFJMUser diff --git a/apps/member/management/commands/import_olddb.py b/apps/member/management/commands/import_olddb.py index 1759f14..bc6cf25 100644 --- a/apps/member/management/commands/import_olddb.py +++ b/apps/member/management/commands/import_olddb.py @@ -1,6 +1,5 @@ from django.core.management import BaseCommand, CommandError from django.db import transaction - from member.models import TFJMUser, Document, Solution, Synthesis, Authorization, MotivationLetter from tournament.models import Team, Tournament diff --git a/apps/member/tests.py b/apps/member/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/apps/member/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/apps/tournament/forms.py b/apps/tournament/forms.py index cb7ab39..d46129d 100644 --- a/apps/tournament/forms.py +++ b/apps/tournament/forms.py @@ -65,7 +65,7 @@ class OrganizerForm(forms.ModelForm): class TeamForm(forms.ModelForm): tournament = forms.ModelChoiceField( - Tournament.objects.filter(date_inscription__gte=timezone.now().date(), final=False), + Tournament.objects.filter(date_inscription__gte=timezone.now(), final=False), ) class Meta: @@ -87,7 +87,7 @@ class TeamForm(forms.ModelForm): if Team.objects.filter(name=cleaned_data["name"], year=os.getenv("TFJM_YEAR")).exists(): self.add_error("name", _("This name is already used.")) - if cleaned_data["tournament"].date_inscription < timezone.now().date(): + if cleaned_data["tournament"].date_inscription < timezone.now: self.add_error("tournament", _("This tournament is already closed.")) return cleaned_data diff --git a/apps/tournament/tests.py b/apps/tournament/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/apps/tournament/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/entrypoint.sh b/entrypoint.sh index 7369b66..8fef126 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,4 @@ #!/bin/bash -# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay -# SPDX-License-Identifier: GPL-3.0-or-later python manage.py compilemessages python manage.py makemigrations diff --git a/tfjm/inputs.py b/tfjm/inputs.py index e917361..67838fc 100644 --- a/tfjm/inputs.py +++ b/tfjm/inputs.py @@ -1,6 +1,3 @@ -# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay -# SPDX-License-Identifier: GPL-3.0-or-later - from json import dumps as json_dumps from django.forms.widgets import DateTimeBaseInput, NumberInput, TextInput, Widget diff --git a/tfjm/middlewares.py b/tfjm/middlewares.py index cf10323..5ac3e30 100644 --- a/tfjm/middlewares.py +++ b/tfjm/middlewares.py @@ -1,6 +1,3 @@ -# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay -# SPDX-License-Identifier: GPL-3.0-or-later - from django.conf import settings from django.contrib.auth.models import AnonymousUser