Loading tests/custom_lookups/tests.py +2 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ class Div3Transform(models.Transform): lhs, lhs_params = qn.compile(self.lhs) return 'mod(%s, 3)' % lhs, lhs_params class Div3BilateralTransform(Div3Transform): bilateral = True Loading @@ -49,6 +50,7 @@ class Mult3BilateralTransform(models.Transform): lhs, lhs_params = qn.compile(self.lhs) return '3 * (%s)' % lhs, lhs_params class UpperBilateralTransform(models.Transform): bilateral = True lookup_name = 'upper' Loading Loading
tests/custom_lookups/tests.py +2 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ class Div3Transform(models.Transform): lhs, lhs_params = qn.compile(self.lhs) return 'mod(%s, 3)' % lhs, lhs_params class Div3BilateralTransform(Div3Transform): bilateral = True Loading @@ -49,6 +50,7 @@ class Mult3BilateralTransform(models.Transform): lhs, lhs_params = qn.compile(self.lhs) return '3 * (%s)' % lhs, lhs_params class UpperBilateralTransform(models.Transform): bilateral = True lookup_name = 'upper' Loading