-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chg: [survey] Initial work on custom free text answers
Signed-off-by: Romain Kieffer <[email protected]>
- Loading branch information
1 parent
06807b2
commit 702344b
Showing
6 changed files
with
102 additions
and
20 deletions.
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
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
61 changes: 61 additions & 0 deletions
61
survey/migrations/1015_alter_surveyquestion_qtype_alter_surveyuser_user_id_and_more.py
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,61 @@ | ||
# Generated by Django 4.2.16 on 2024-09-30 13:19 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("survey", "1014_alter_surveyuser_user_id_surveyquestionmaxscore_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="surveyquestion", | ||
name="qtype", | ||
field=models.CharField( | ||
choices=[ | ||
("M", "Multiple Choice"), | ||
("S", "Single Choice"), | ||
("SO", "Single Option Choice"), | ||
("T", "Free text"), | ||
("MT", "Multiple Choice + Free Text"), | ||
("ST", "Single Choice + Free Text"), | ||
("CL", "Countries list"), | ||
("CT", "Context with Text"), | ||
], | ||
default="M", | ||
max_length=2, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="surveyuser", | ||
name="user_id", | ||
field=models.UUIDField(default=uuid.uuid4, unique=True), | ||
), | ||
migrations.CreateModel( | ||
name="SurveyUserCustomAnswer", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("question", models.CharField(default="0", max_length=100)), | ||
("answer", models.TextField(blank=True, default="")), | ||
( | ||
"user", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="survey.surveyuser", | ||
), | ||
), | ||
], | ||
), | ||
] |
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