added extra step
This commit is contained in:
parent
22859b679f
commit
5e4787665e
@ -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")
|
||||
]
|
||||
|
||||
@ -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)
|
||||
Loading…
x
Reference in New Issue
Block a user