1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-24 17:42:23 +00:00

Place field is useless

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2022-04-26 21:42:29 +02:00
parent 3a650a1e89
commit c686584e74
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
6 changed files with 20 additions and 13 deletions

View File

@ -27,7 +27,7 @@ class PassageViewSet(ModelViewSet):
queryset = Passage.objects.all() queryset = Passage.objects.all()
serializer_class = PassageSerializer serializer_class = PassageSerializer
filter_backends = [DjangoFilterBackend] filter_backends = [DjangoFilterBackend]
filterset_fields = ['pool', 'place', 'solution_number', 'defender', 'opponent', 'reporter', 'pool_tournament', ] filterset_fields = ['pool', 'solution_number', 'defender', 'opponent', 'reporter', 'pool_tournament', ]
class PoolViewSet(ModelViewSet): class PoolViewSet(ModelViewSet):

View File

@ -204,7 +204,7 @@ class PassageForm(forms.ModelForm):
class Meta: class Meta:
model = Passage model = Passage
fields = ('solution_number', 'place', 'defender', 'opponent', 'reporter', 'defender_penalties',) fields = ('solution_number', 'defender', 'opponent', 'reporter', 'defender_penalties',)
class SynthesisForm(forms.ModelForm): class SynthesisForm(forms.ModelForm):

View File

@ -0,0 +1,17 @@
# Generated by Django 3.2.13 on 2022-04-26 19:42
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('participation', '0006_auto_20220426_1346'),
]
operations = [
migrations.RemoveField(
model_name='passage',
name='place',
),
]

View File

@ -404,13 +404,6 @@ class Passage(models.Model):
related_name="passages", related_name="passages",
) )
place = models.CharField(
verbose_name=_("place"),
max_length=255,
help_text=_("Where the solution is presented?"),
default="Non indiqué",
)
solution_number = models.PositiveSmallIntegerField( solution_number = models.PositiveSmallIntegerField(
verbose_name=_("defended solution"), verbose_name=_("defended solution"),
choices=[ choices=[

View File

@ -120,7 +120,7 @@ class PassageTable(tables.Table):
'class': 'table table-condensed table-striped text-center', 'class': 'table table-condensed table-striped text-center',
} }
model = Passage model = Passage
fields = ('defender', 'opponent', 'reporter', 'solution_number', 'place',) fields = ('defender', 'opponent', 'reporter', 'solution_number', )
template_name = 'django_tables2/bootstrap4.html' template_name = 'django_tables2/bootstrap4.html'

View File

@ -25,9 +25,6 @@
<dt class="col-sm-3">{% trans "Defended solution:" %}</dt> <dt class="col-sm-3">{% trans "Defended solution:" %}</dt>
<dd class="col-sm-9"><a href="{{ passage.defended_solution.file.url }}" data-turbolinks="false">{{ passage.defended_solution }}</a></dd> <dd class="col-sm-9"><a href="{{ passage.defended_solution.file.url }}" data-turbolinks="false">{{ passage.defended_solution }}</a></dd>
<dt class="col-sm-3">{% trans "Place:" %}</dt>
<dd class="col-sm-9">{{ passage.place }}</dd>
<dt class="col-sm-3">{% trans "Defender penalties count:" %}</dt> <dt class="col-sm-3">{% trans "Defender penalties count:" %}</dt>
<dd class="col-sm-9">{{ passage.defender_penalties }}</dd> <dd class="col-sm-9">{{ passage.defender_penalties }}</dd>