added extra step

This commit is contained in:
Tiago Scholten 2026-10-17 17:23:45 +02:00
parent 22859b679f
commit 5e4787665e
2 changed files with 5 additions and 3 deletions

View File

@ -3,8 +3,9 @@ from typing import Annotated
from pydantic import Field from pydantic import Field
from .answer_open_questions import AnswerOpenQuestions from .answer_open_questions import AnswerOpenQuestions
from .answer_checkmarks import AnswerCheckmarks
AnswerUnion = Annotated[ AnswerUnion = Annotated[
AnswerOpenQuestions, AnswerOpenQuestions, AnswerCheckmarks
Field(discriminator="category") Field(discriminator="category")
] ]

View File

@ -4,9 +4,10 @@ In order to add a new question type you need to:
2) add it to the list of question tags 2) add it to the list of question tags
3) Create the FormXXX in element 3) Create the FormXXX in element
4) Create the AnswerXXX in answer 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! 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 6a) Add it to the process_question function event/util.py
6b) Add it to core/templates/form 6b) Add it to core/templates/form
6c) Add it to the form page (currently dlfsite/templates/testing/form.html) 6c) Add it to the form page (currently dlfsite/templates/testing/form.html)