From 5e4787665e62865a54ec7af247f632db705c443f Mon Sep 17 00:00:00 2001 From: Tiago Scholten Date: Sat, 17 Oct 2026 17:23:45 +0200 Subject: [PATCH] added extra step --- src/fiber_package/signup/answer/types.py | 3 ++- src/fiber_package/signup/howto-add-new-question.txt | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fiber_package/signup/answer/types.py b/src/fiber_package/signup/answer/types.py index 8f9effd..92c17e8 100644 --- a/src/fiber_package/signup/answer/types.py +++ b/src/fiber_package/signup/answer/types.py @@ -3,8 +3,9 @@ from typing import Annotated from pydantic import Field from .answer_open_questions import AnswerOpenQuestions +from .answer_checkmarks import AnswerCheckmarks AnswerUnion = Annotated[ - AnswerOpenQuestions, + AnswerOpenQuestions, AnswerCheckmarks Field(discriminator="category") ] diff --git a/src/fiber_package/signup/howto-add-new-question.txt b/src/fiber_package/signup/howto-add-new-question.txt index e948dbf..7c931ae 100644 --- a/src/fiber_package/signup/howto-add-new-question.txt +++ b/src/fiber_package/signup/howto-add-new-question.txt @@ -4,9 +4,10 @@ In order to add a new question type you need to: 2) add it to the list of question tags 3) Create the FormXXX in element 4) Create the AnswerXXX in answer -5) Add it to the question union type in answer.types +5) Add it to the answer union type in answer.types +6) Add it to the question union type in element.types Tip: run ./pre-commit to run the typechecker to see if you got your imports right! -6) Add it to fiber-django +7) Add it to fiber-django 6a) Add it to the process_question function event/util.py 6b) Add it to core/templates/form 6c) Add it to the form page (currently dlfsite/templates/testing/form.html) \ No newline at end of file