Change oioioi~master~I493c27f3edfde16fdd80781819e7dcfc06dc51ef, patchset 10
https://gerrit.sio2project.mimuw.edu.pl/3137
(
SIO-1890) Allow multiple exclusiveness configs
This change should allow to define more than one exclusiveness config.
Also displays a warning when a round is set not to be exclusive.
It would be safer to have a confirmation dialog instead of a warning but
since exclusiveness configs covering every round can change both with
changes to rounds and configs themselves, Django admin makes it
difficult (you can't easily cross-validate different formsets, and in
save_formset it's too late to raise validation errors).
This could be done in javascript, but it would be impossible to test it
and as such it could be unsafe to rely on it working properly.
Added the following tests testing this functionality:
- oioioi/contestexcl/tests.py
- class TestExclusiveContestsAdmin:
- test_exclusiveness_multiple_on
- test_exclusiveness_multiple_off
- test_exclusiveness_multiple_mixed_on_off
- test_exclusiveness_round_warning
- test_exclusiveness_round_warning_multiple_configs
- class TestExclusiveContests:
- test_exclusive_contest_multiple_configs
And also refactored other contestexcl tests to avoid repeating code
Change-Id: I493c27f3edfde16fdd80781819e7dcfc06dc51ef
https://gerrit.sio2project.mimuw.edu.pl/3137
(
SIO-1890) Allow multiple exclusiveness configsThis should allow to define more than one exclusiveness config.
Also displays a warning when a round is set not to be exclusive.
It would be nice to have a confirmation dialog instead of a warning, but
since exclusiveness configs covering every round can change both with
changes to rounds and configs themselves, Django admin makes it
difficult (you can't easily cross-validate different formsets).
This could be done in javascript, but it would be impossible to test it
and as such it could be dangerous to rely on it working properly.
Change-Id: I493c27f3edfde16fdd80781819e7dcfc06dc51ef
TODO: tests
TODO: breaks a test, why even?