Add standard choices, operators, and value fields for conditions.
Review Request #8269 — Created July 6, 2016 and submitted — Latest diff uploaded
This introduces a set of standard objects for conditions. These provide base choice classes for working with strings, integers, and booleans, along with a set of operators appropriate to each. There are also value fields designed to properly handle booleans, integers, and strings in a more convenient way. Future changes will introduce additional types, such as for dates/times.
Unit tests pass.
Used these operators with some changes for a Review Board extension.
djblets/conditions/choices.py |
---|
djblets/conditions/operators.py |
---|
djblets/conditions/values.py |
---|
djblets/conditions/tests/test_operators.py |
---|
djblets/conditions/tests/test_values.py |
---|