mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 06:22:22 +00:00
Place field is useless
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
3a650a1e89
commit
c686584e74
@ -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):
|
||||||
|
@ -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):
|
||||||
|
17
apps/participation/migrations/0007_remove_passage_place.py
Normal file
17
apps/participation/migrations/0007_remove_passage_place.py
Normal 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',
|
||||||
|
),
|
||||||
|
]
|
@ -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=[
|
||||||
|
@ -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'
|
||||||
|
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user