Django

Code

Changeset 4917

Show
Ignore:
Timestamp:
04/03/07 17:33:28 (2 years ago)
Author:
adrian
Message:

Negligible formatting changes to some recent commits

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/localflavor/usa/forms.py

    r4910 r4917  
    4444          promotional use or distribution (e.g., the Woolworth's number or the 1962 
    4545          promotional number). 
    46      
    4746    """ 
    4847    def clean(self, value): 
     
    5049        if value in EMPTY_VALUES: 
    5150            return u'' 
    52         msg = gettext(u'Enter a valid US Social Security number in XXX-XX-XXXX format') 
     51        msg = gettext(u'Enter a valid U.S. Social Security number in XXX-XX-XXXX format.') 
    5352        match = re.match(ssn_re, value) 
    5453        if not match: 
    5554            raise ValidationError(msg) 
    5655        area, group, serial = match.groupdict()['area'], match.groupdict()['group'], match.groupdict()['serial'] 
    57          
     56 
    5857        # First pass: no blocks of all zeroes. 
    5958        if area == '000' or \ 
     
    6160           serial == '0000': 
    6261            raise ValidationError(msg) 
    63          
     62 
    6463        # Second pass: promotional and otherwise permanently invalid numbers. 
    6564        if area == '666' or \ 
    66            (area == '987' and group == '65' and \ 
    67             4320 <= int(serial) <= 4329) or \ 
     65           (area == '987' and group == '65' and 4320 <= int(serial) <= 4329) or \ 
    6866           value == '078-05-1120' or \ 
    6967           value == '219-09-9999': 
  • django/trunk/setup.py

    r4912 r4917  
    3131pieces = fullsplit(root_dir) 
    3232if pieces[-1] == '': 
    33     len_root_dir = len(pieces)- 1 
     33    len_root_dir = len(pieces) - 1 
    3434else: 
    3535    len_root_dir = len(pieces) 
  • django/trunk/tests/regressiontests/forms/localflavor.py

    r4910 r4917  
    257257Traceback (most recent call last): 
    258258... 
    259 ValidationError: [u'Enter a valid US Social Security number in XXX-XX-XXXX format'] 
     259ValidationError: [u'Enter a valid U.S. Social Security number in XXX-XX-XXXX format.'] 
    260260 
    261261# UKPostcodeField #############################################################