diff --git a/apps/participation/api/views.py b/apps/participation/api/views.py index d02fd9c..a1a159b 100644 --- a/apps/participation/api/views.py +++ b/apps/participation/api/views.py @@ -27,7 +27,7 @@ class PassageViewSet(ModelViewSet): queryset = Passage.objects.all() serializer_class = PassageSerializer 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): diff --git a/apps/participation/forms.py b/apps/participation/forms.py index 5491f78..f2912bc 100644 --- a/apps/participation/forms.py +++ b/apps/participation/forms.py @@ -204,7 +204,7 @@ class PassageForm(forms.ModelForm): class Meta: model = Passage - fields = ('solution_number', 'place', 'defender', 'opponent', 'reporter', 'defender_penalties',) + fields = ('solution_number', 'defender', 'opponent', 'reporter', 'defender_penalties',) class SynthesisForm(forms.ModelForm): diff --git a/apps/participation/migrations/0007_remove_passage_place.py b/apps/participation/migrations/0007_remove_passage_place.py new file mode 100644 index 0000000..b1810b1 --- /dev/null +++ b/apps/participation/migrations/0007_remove_passage_place.py @@ -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', + ), + ] diff --git a/apps/participation/models.py b/apps/participation/models.py index 570275d..91d0f5f 100644 --- a/apps/participation/models.py +++ b/apps/participation/models.py @@ -404,13 +404,6 @@ class Passage(models.Model): 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( verbose_name=_("defended solution"), choices=[ diff --git a/apps/participation/tables.py b/apps/participation/tables.py index 722f74b..a935ed5 100644 --- a/apps/participation/tables.py +++ b/apps/participation/tables.py @@ -120,7 +120,7 @@ class PassageTable(tables.Table): 'class': 'table table-condensed table-striped text-center', } model = Passage - fields = ('defender', 'opponent', 'reporter', 'solution_number', 'place',) + fields = ('defender', 'opponent', 'reporter', 'solution_number', ) template_name = 'django_tables2/bootstrap4.html' diff --git a/apps/participation/templates/participation/passage_detail.html b/apps/participation/templates/participation/passage_detail.html index bd2a15e..e34008b 100644 --- a/apps/participation/templates/participation/passage_detail.html +++ b/apps/participation/templates/participation/passage_detail.html @@ -25,9 +25,6 @@
{% trans "Defended solution:" %}
{{ passage.defended_solution }}
-
{% trans "Place:" %}
-
{{ passage.place }}
-
{% trans "Defender penalties count:" %}
{{ passage.defender_penalties }}