Question
question.models:#
Choice
#
Bases: Model
Choice model for Question with choices
Attributes:
Name | Type | Description |
---|---|---|
key |
slug
|
Unique identifier |
text |
str
|
Choice text |
index |
int
|
Index of choice within Question |
question |
Question
|
Question that contains the Choice |
Source code in question/models.py
Question
#
Bases: Model
Model for question asked during experiment
Attributes:
Name | Type | Description |
---|---|---|
key |
slug
|
Unique identifier |
question |
str
|
Question text |
editable |
bool
|
False for built-in questions. Key and type of a built-in question cannot be changed. |
explainer |
str
|
Question explainer text |
type |
str
|
Question type {“BooleanQuestion”, “ChoiceQuestion”, “NumberQuestion”, “TextQuestion”, “LikertQuestion”, “LikertQuestionIcon”, “AutoCompleteQuestion”} |
scale_steps |
int
|
Number of scale steps {5, 7} (applies to LikertQuestion, LikertQuestionIcon) |
profile_scoring_rule |
str
|
Profile scoring rule {“”, “LIKERT”, “REVERSE_LIKERT”, “CATEGORIES_TO_LIKERT”} (ChoiceQuestion, LikertQuestion) |
min_value |
float
|
Minimal value (NumberQuestion) |
max_value |
float
|
Maximal value (NumberQuestion) |
max_length |
int
|
Maximal length (TextQuestion) |
min_values |
int
|
Minimum number of values to choose (ChoiceQuestion) |
view |
int
|
Question view {“BUTTON_ARRAY”, “CHECKBOXES”, “RADIOS”, “DROPDOWN”} (ChoiceQuestion) |
is_skippable |
bool
|
If question can be skipped during experiment |
Source code in question/models.py
QuestionGroup
#
Bases: Model
Convenience model for groups of questions to add at once to Block QuestionSeries from admin
Attributes:
Name | Type | Description |
---|---|---|
key |
str
|
Unique identifier |
questions |
Queryset[Question]
|
ManyToManyField to Questions that the QuestionGroup contains |
editable |
bool
|
QuestionGroup can be edited if True |
Source code in question/models.py
QuestionInSeries
#
Bases: Model
Question with its index in QuestionSeries
Attributes:
Name | Type | Description |
---|---|---|
question_series |
QuestionSeries
|
QuestionSeries that contains the Question |
question |
Question
|
Question linked to question_series |
index |
int
|
Index of Question within QuestionSeries |
Source code in question/models.py
QuestionSeries
#
Bases: Model
Series of Questions asked in a Block
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Name of the QuestionSeries |
block |
Block
|
Block that contains QuestionSeries |
index |
int
|
Index of QuestionSeries within Block |
questions |
Queryset[Question]
|
ManyToManyField to Questions that the QuestionSeries contains |
randomize |
bool
|
Randomize questions within QuestionSeries |