Questionnaire improvements

This commit is contained in:
Keannu Bernasol 2024-11-28 16:23:18 +08:00
parent 559baca38c
commit 776c3e08e1
3 changed files with 158 additions and 2 deletions

View file

@ -1,3 +1,11 @@
from django.contrib import admin
from unfold.admin import ModelAdmin
# Register your models here.
from .models import Questionnaire
@admin.register(Questionnaire)
class QuestionnaireAdmin(ModelAdmin):
model = Questionnaire
search_fields = ["id", "date_submitted"]
list_display = ["id", "date_submitted"]

View file

@ -0,0 +1,148 @@
# Generated by Django 5.1.3 on 2024-11-28 07:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("questionnaires", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="questionnaire",
name="sqd0_answer",
field=models.CharField(
choices=[
("1", "Strongly Disagree"),
("2", "Disagree"),
("3", "Neither Agree nor Disagree"),
("4", "Agree"),
("5", "Strongly Agree"),
("6", "N/A"),
],
max_length=16,
),
),
migrations.AlterField(
model_name="questionnaire",
name="sqd1_answer",
field=models.CharField(
choices=[
("1", "Strongly Disagree"),
("2", "Disagree"),
("3", "Neither Agree nor Disagree"),
("4", "Agree"),
("5", "Strongly Agree"),
("6", "N/A"),
],
max_length=16,
),
),
migrations.AlterField(
model_name="questionnaire",
name="sqd2_answer",
field=models.CharField(
choices=[
("1", "Strongly Disagree"),
("2", "Disagree"),
("3", "Neither Agree nor Disagree"),
("4", "Agree"),
("5", "Strongly Agree"),
("6", "N/A"),
],
max_length=16,
),
),
migrations.AlterField(
model_name="questionnaire",
name="sqd3_answer",
field=models.CharField(
choices=[
("1", "Strongly Disagree"),
("2", "Disagree"),
("3", "Neither Agree nor Disagree"),
("4", "Agree"),
("5", "Strongly Agree"),
("6", "N/A"),
],
max_length=16,
),
),
migrations.AlterField(
model_name="questionnaire",
name="sqd4_answer",
field=models.CharField(
choices=[
("1", "Strongly Disagree"),
("2", "Disagree"),
("3", "Neither Agree nor Disagree"),
("4", "Agree"),
("5", "Strongly Agree"),
("6", "N/A"),
],
max_length=16,
),
),
migrations.AlterField(
model_name="questionnaire",
name="sqd5_answer",
field=models.CharField(
choices=[
("1", "Strongly Disagree"),
("2", "Disagree"),
("3", "Neither Agree nor Disagree"),
("4", "Agree"),
("5", "Strongly Agree"),
("6", "N/A"),
],
max_length=16,
),
),
migrations.AlterField(
model_name="questionnaire",
name="sqd6_answer",
field=models.CharField(
choices=[
("1", "Strongly Disagree"),
("2", "Disagree"),
("3", "Neither Agree nor Disagree"),
("4", "Agree"),
("5", "Strongly Agree"),
("6", "N/A"),
],
max_length=16,
),
),
migrations.AlterField(
model_name="questionnaire",
name="sqd7_answer",
field=models.CharField(
choices=[
("1", "Strongly Disagree"),
("2", "Disagree"),
("3", "Neither Agree nor Disagree"),
("4", "Agree"),
("5", "Strongly Agree"),
("6", "N/A"),
],
max_length=16,
),
),
migrations.AlterField(
model_name="questionnaire",
name="sqd8_answer",
field=models.CharField(
choices=[
("1", "Strongly Disagree"),
("2", "Disagree"),
("3", "Neither Agree nor Disagree"),
("4", "Agree"),
("5", "Strongly Agree"),
("6", "N/A"),
],
max_length=16,
),
),
]

View file

@ -74,7 +74,7 @@ class Questionnaire(models.Model):
# SQD Questions
SQD_CHOICES = (
("1", "Strongly disagree"),
("1", "Strongly Disagree"),
("2", "Disagree"),
("3", "Neither Agree nor Disagree"),
("4", "Agree"),