TODO markings

This commit is contained in:
Mira Weller
2026-08-13 16:53:15 +02:00
parent d47245feb5
commit 2db1e978b2
7 changed files with 18 additions and 16 deletions
+1 -1
View File
@@ -975,7 +975,7 @@ class DeviceEventSettingsSerializer(EventSettingsSerializer):
'reusable_media_type_nfc_mf0aes', 'reusable_media_type_nfc_mf0aes',
'reusable_media_type_nfc_mf0aes_random_uid', 'reusable_media_type_nfc_mf0aes_random_uid',
'reusable_media_usage_enforced', 'reusable_media_usage_enforced',
'system_question_order', # TODO - remove or replace 'system_question_order', # TODO(questionnaires) - remove or replace
'tax_rule_payment', 'tax_rule_payment',
'tax_rule_cancellation', 'tax_rule_cancellation',
] ]
+1 -1
View File
@@ -933,7 +933,7 @@ class OrderLevelQuestionsForm(BaseQuestionsForm):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
# TODO - switch to questionnaires ! # TODO(questionnaires) - switch olq's to questionnaires !
questions = Question.objects.filter( questions = Question.objects.filter(
event=event, container_type=Question.ContainerType.ORDER, event=event, container_type=Question.ContainerType.ORDER,
ask_during_checkin=False, hidden=False, ask_during_checkin=False, hidden=False,
@@ -192,5 +192,5 @@ class Migration(migrations.Migration):
migrate_questions_forward, migrate_questions_forward,
migrate_questions_backward, migrate_questions_backward,
), ),
# TODO remove old columns from Question model # TODO(questionnaires) remove old columns from Question model
] ]
+12 -10
View File
@@ -1594,7 +1594,7 @@ class Question(LoggedModel):
:param required: Whether answering this question is required for submitting an order including :param required: Whether answering this question is required for submitting an order including
items associated with this question. items associated with this question.
:type required: bool :type required: bool
:param items: A set of ``Items`` objects that this question should be applied to :param items: TO BE REMOVED
:param ask_during_checkin: Whether to ask this question during check-in instead of during check-out. :param ask_during_checkin: Whether to ask this question during check-in instead of during check-out.
:type ask_during_checkin: bool :type ask_during_checkin: bool
:param show_during_checkin: Whether to show the answer to this question during check-in. :param show_during_checkin: Whether to show the answer to this question during check-in.
@@ -1652,7 +1652,8 @@ class Question(LoggedModel):
verbose_name=_("Asked on"), verbose_name=_("Asked on"),
default=ContainerType.ORDERPOSITION, default=ContainerType.ORDERPOSITION,
) )
question = I18nTextField( # to be renamed to 'internal_name' question = I18nTextField(
# TODO(questionnaires) : to be renamed to 'internal_name'
verbose_name=_("Question") verbose_name=_("Question")
) )
identifier = models.CharField( identifier = models.CharField(
@@ -1667,7 +1668,8 @@ class Question(LoggedModel):
), ),
], ],
) )
help_text = I18nTextField( # to be removed help_text = I18nTextField(
# TODO(questionnaires) : to be removed
verbose_name=_("Help text"), verbose_name=_("Help text"),
help_text=_("If the question needs to be explained or clarified, do it here!"), help_text=_("If the question needs to be explained or clarified, do it here!"),
null=True, blank=True, null=True, blank=True,
@@ -1677,22 +1679,22 @@ class Question(LoggedModel):
choices=TYPE_CHOICES, choices=TYPE_CHOICES,
verbose_name=_("Question type") verbose_name=_("Question type")
) )
required = models.BooleanField( # to be removed, -> QuestionnaireChild required = models.BooleanField( # TODO(questionnaires) : to be removed, -> QuestionnaireChild
default=False, default=False,
verbose_name=_("Required question") verbose_name=_("Required question")
) )
items = models.ManyToManyField( # to be removed, -> Questionnaire items = models.ManyToManyField( # TODO(questionnaires) : to be removed, -> Questionnaire
Item, Item,
related_name='questions', related_name='questions',
verbose_name=_("Products"), verbose_name=_("Products"),
blank=True, blank=True,
help_text=_('This question will be asked to buyers of the selected products') help_text=_('This question will be asked to buyers of the selected products')
) )
position = models.PositiveIntegerField( # to be removed, -> Questionnaire + QuestionnaireChild position = models.PositiveIntegerField( # TODO(questionnaires) : to be removed, -> Questionnaire + QuestionnaireChild
default=0, default=0,
verbose_name=_("Position") verbose_name=_("Position")
) )
ask_during_checkin = models.BooleanField( # to be removed ask_during_checkin = models.BooleanField( # TODO(questionnaires) : to be removed
verbose_name=_('Ask during check-in instead of in the ticket buying process'), verbose_name=_('Ask during check-in instead of in the ticket buying process'),
help_text=_('Not supported by all check-in apps for all question types.'), help_text=_('Not supported by all check-in apps for all question types.'),
default=False default=False
@@ -1711,10 +1713,10 @@ class Question(LoggedModel):
verbose_name=_('Print answer on invoices'), verbose_name=_('Print answer on invoices'),
default=False default=False
) )
dependency_question = models.ForeignKey( # to be removed, -> QuestionnaireChild dependency_question = models.ForeignKey( # TODO(questionnaires) : to be removed, -> QuestionnaireChild
'Question', null=True, blank=True, on_delete=models.SET_NULL, related_name='dependent_questions' 'Question', null=True, blank=True, on_delete=models.SET_NULL, related_name='dependent_questions'
) )
dependency_values = MultiStringField(default=[]) # to be removed, -> QuestionnaireChild dependency_values = MultiStringField(default=[]) # TODO(questionnaires) : to be removed, -> QuestionnaireChild
valid_number_min = models.DecimalField(decimal_places=6, max_digits=30, null=True, blank=True, valid_number_min = models.DecimalField(decimal_places=6, max_digits=30, null=True, blank=True,
verbose_name=_('Minimum value'), verbose_name=_('Minimum value'),
help_text=_('Currently not supported in our apps and during check-in')) help_text=_('Currently not supported in our apps and during check-in'))
@@ -1896,7 +1898,7 @@ class Question(LoggedModel):
return answer return answer
@staticmethod @staticmethod
def clean_items(event, items): def clean_items(event, items): # TODO(questionnaires) : remove method / move to qc
for item in items: for item in items:
if event != item.event: if event != item.event:
raise ValidationError(_('One or more items do not belong to this event.')) raise ValidationError(_('One or more items do not belong to this event.'))
+1 -1
View File
@@ -379,7 +379,7 @@ DEFAULTS = {
) )
}, },
'system_question_order': { # TODO - remove this 'system_question_order': { # TODO(questionnaires) - remove this
'default': {}, 'default': {},
'type': dict, 'type': dict,
'serializer_class': serializers.DictField, 'serializer_class': serializers.DictField,
@@ -23,7 +23,7 @@
{% endblocktrans %} {% endblocktrans %}
</p> </p>
<p> <p>
TODO: add more specific explanation of the questionnaire concept. TODO(questionnaires) : add more specific explanation of the questionnaire concept.
</p> </p>
{{ request.event.settings.locales|json_script:"event_locales" }} {{ request.event.settings.locales|json_script:"event_locales" }}
@@ -643,7 +643,7 @@
{{ q.answer.to_string_i18n|rich_text_snippet }} {{ q.answer.to_string_i18n|rich_text_snippet }}
{% elif q.type %} {% elif q.type %}
{{ q.answer.to_string_i18n|linebreaksbr }} {{ q.answer.to_string_i18n|linebreaksbr }}
{% else %}<!-- TODO: proper separation of QuestionAnswer objects and system answers...... --> {% else %}<!-- TODO(questionnaires): proper separation of QuestionAnswer objects and system answers...... -->
{{ q.answer|linebreaksbr }} {{ q.answer|linebreaksbr }}
{% endif %} {% endif %}
{% else %} {% else %}