New type + questions

This commit is contained in:
Tiago Scholten 2026-10-17 16:51:41 +02:00
parent 74a4c947a1
commit 71853ac32d
3 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@ from typing import Literal
from .answer_base import AnswerBase
from fiber_package.signup.enums import FormElementCategory
class AnswerOpenQuestions(AnswerBase):
class AnswerCheckmarks(AnswerBase):
category: Literal[FormElementCategory.checkmarks]
answer_list: list[bool]

View File

@ -4,7 +4,7 @@ from pydantic import BaseModel
from .form_base_question import FormBaseQuestion
from fiber_package.signup.enums import FormElementCategory
from fiber_package.signup.answer.answer_open_questions import AnswerCheckmarks
from fiber_package.signup.answer.answer_checkmarks import AnswerCheckmarks
class CheckmarkQuestion(BaseModel):
question_en: str

View File

@ -5,4 +5,5 @@ In order to add a new question type you need to:
3) Create the FormXXX in element
4) Create the AnswerXXX in answer
5) Add it to the question union type in answer.types
Tip: run ./pre-commit to run the typechecker to see if you got your imports right!
6) Add it to fiber-django