Ticket #12595: localflavor_pl_fix.diff

File localflavor_pl_fix.diff, 1.6 KB (added by Sayane, 15 years ago)
  • django/contrib/localflavor/pl/forms.py

     
    3939        'checksum': _(u'Wrong checksum for the National Identification Number.'),
    4040    }
    4141
    42     def __init__(self, *args, **kwargs):
     42    def __init__(self, max_length=None, min_length=None, *args, **kwargs):
    4343        super(PLPESELField, self).__init__(r'^\d{11}$',
    4444            max_length=None, min_length=None, *args, **kwargs)
    4545
     
    7272        'checksum': _(u'Wrong checksum for the Tax Number (NIP).'),
    7373    }
    7474
    75     def __init__(self, *args, **kwargs):
     75    def __init__(self, max_length=None, min_length=None, *args, **kwargs):
    7676        super(PLNIPField, self).__init__(r'^\d{3}-\d{3}-\d{2}-\d{2}$|^\d{2}-\d{2}-\d{3}-\d{3}$',
    7777            max_length=None, min_length=None, *args, **kwargs)
    7878
     
    110110        'checksum': _(u'Wrong checksum for the National Business Register Number (REGON).'),
    111111    }
    112112
    113     def __init__(self, *args, **kwargs):
     113    def __init__(self, max_length=None, min_length=None, *args, **kwargs):
    114114        super(PLREGONField, self).__init__(r'^\d{9,14}$',
    115115            max_length=None, min_length=None, *args, **kwargs)
    116116
     
    148148        'invalid': _(u'Enter a postal code in the format XX-XXX.'),
    149149    }
    150150
    151     def __init__(self, *args, **kwargs):
     151    def __init__(self, max_length=None, min_length=None, *args, **kwargs):
    152152        super(PLPostalCodeField, self).__init__(r'^\d{2}-\d{3}$',
    153153            max_length=None, min_length=None, *args, **kwargs)
Back to Top