Ejemplo n.º 1
0
 def save(self, *args, **kwargs):
     if self.postal_codes_pattern:
         min_value, max_value = Pattern(
             self.postal_codes_pattern).get_alphabetical_limits()
         self._postal_codes_min = min_value
         self._postal_codes_max = max_value
     return super(TaxRule, self).save(*args, **kwargs)
Ejemplo n.º 2
0
def ReconstitutedPattern(pat):
    return Pattern(Pattern(pat).as_normalized())