forked from EGCETSII/decide_django_2
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CREAR TIPO POSTPROCESADO EN QUESTION
Se ha añadido un nuevo atributo en el model Question que indica el tipo de postprocesado que se utilizará para hacer el recuento de la votación. Inicialmente añadimos 3 tipos: DHont, Borda, SaintLaigue. Serán los tres que implementarán el equipo encargado del modulo postproc. Se actualizará en caso de que sea necesario. En el views, se añade el atributo postproc_type creado en el método post para que pueda ser elegido en el formulación de creación de la pregunta.
- Loading branch information
Showing
4 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.0 on 2021-12-18 18:22 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('voting', '0003_auto_20180605_0842'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='question', | ||
name='postproc_type', | ||
field=models.IntegerField(choices=[(1, 'Dhont'), (2, 'Borda'), (3, 'SaintLague')], default=1), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.0 on 2021-12-18 18:35 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('voting', '0004_question_postproc_type'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='question', | ||
name='postproc_type', | ||
field=models.IntegerField(choices=[(2, 'Borda'), (1, 'Dhont'), (3, 'SaintLague')], default=1), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters