S
S
Sazoks2021-11-17 20:28:44
Django
Sazoks, 2021-11-17 20:28:44

Django ORM | What is the best way to create a quiz model?

There is a quiz that branches off depending on the user's answers. This means that if the user has conditionally selected option A, then the options that follow option B will not be selected (i.e., their data will not be filled in).

Now I have implemented all fields in one model with blank and null flags set to True. But it seems to me that this is a bad decision, because. everything comes together in a heap.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Tikhonov, 2021-11-22
@tumbler

Question, Answer Model, and M2M A field next to a question that says which answers the question can follow. Plus the "initial question" flag.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question