Allow dependencies between questions (#1202)

- [x] data model
- [x] api
- [x] backend editor
- [x] backend validation logic
- [x] frontend display logic
- [x] frontend validation logic
- [x] test checkout step
- [x] test modify order in frontend
- [x] test modify order in backend
- [x] validation tests
- [x] correctly evaluate dependency tree in frontend?
- [x] copy events
This commit is contained in:
Raphael Michel
2019-03-13 16:49:20 +01:00
committed by GitHub
parent d10cbd07a7
commit f95e8f374d
22 changed files with 825 additions and 211 deletions

View File

@@ -13,7 +13,7 @@ class QuestionsViewMixin(BaseQuestionsViewMixin):
@cached_property
def _positions_for_questions(self):
qqs = Question.objects.all()
qqs = self.request.event.questions.all()
if self.only_user_visible:
qqs = qqs.filter(ask_during_checkin=False)
cart = get_cart(self.request).select_related(
@@ -33,7 +33,7 @@ class QuestionsViewMixin(BaseQuestionsViewMixin):
Question.objects.none(),
to_attr='dummy'
)))
),
).select_related('dependency_question'),
to_attr='questions_to_ask')
)
return sorted(list(cart), key=self._keyfunc)