Ticket #17027: add_pow_to_expression_node.diff

File add_pow_to_expression_node.diff, 741 bytes (added by dan@…, 3 years ago)
  • django/db/models/expressions.py

     
    1010    SUB = '-'
    1111    MUL = '*'
    1212    DIV = '/'
     13    POW = '^'
    1314    MOD = '%%'  # This is a quoted % operator - it is quoted
    1415                # because it can be used in strings that also
    1516                # have parameter substitution.
     
    6162    def __div__(self, other):
    6263        return self._combine(other, self.DIV, False)
    6364
     65    def __pow__(self, other):
     66        return self._combine(other, self.POW, False)
     67
    6468    def __mod__(self, other):
    6569        return self._combine(other, self.MOD, False)
    6670
Back to Top