New to Django, do not judge strictly.
I want to make a simple site with a test. Two tables are needed for this: Question and Choices. Moreover, each question clearly corresponds to its 4 possible answers, only one of which is correct.
class Question(models.Model): question_text = models.CharField(max_length=300) # вариант ответа class Answer(models.Model): question = ForeginKey(Question, on_delete=models.CASCADE) # а вот здесь не знаю, как создать такой член класса, чтобы он # одновременно содержал 4 варианта ответа и удобно хранился в таблице Django version 2.1
CharField. Answer option should contain one answer option. - Sergey GornostaevCharFieldstores only one answer, and I need 4 options. Or why don't I understand? - SetplusAnswershould hold one answer. 4 answers are necessary - create four copies. - Sergey Gornostaevshell, but programmatically. - Setplus