Activity system #3
@ -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]
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user