Ticket #11734: forms.diff

File forms.diff, 1.4 KB (added by jbkunst, 15 years ago)
  • forms.py

     
    99
    1010
    1111class CLRegionSelect(Select):
    12     """
    13     A Select widget that uses a list of Chilean Regions (Regiones)
    14     as its choices.
    15     """
    16     def __init__(self, attrs=None):
    17         from cl_regions import REGION_CHOICES
    18         super(CLRegionSelect, self).__init__(attrs, choices=REGION_CHOICES)
     12   
     13        def __init__(self, attrs=None):
     14                from cl_reg_prov_com import REGION_CHOICES
     15                super(CLRegionSelect, self).__init__(attrs, choices=REGION_CHOICES)
    1916
     17class CLProvinciaSelect(Select):
     18   
     19        def __init__(self, attrs=None):
     20                from cl_reg_prov_com import PROVINCIA_CHOICES
     21                super(CLProvinciaSelect, self).__init__(attrs, choices=PROVINCIA_CHOICES)
     22
     23class CLComunaSelect(Select):
     24   
     25        def __init__(self, attrs=None):
     26                from cl_reg_prov import COMUNA_CHOICES
     27                super(CLComunaSelect, self).__init__(attrs, choices=COMUNA_CHOICES)
     28
    2029class CLRutField(RegexField):
    2130    """
    2231    Chilean "Rol Unico Tributario" (RUT) field. This is the Chilean national
     
    9099            else:
    91100                new_dot = pos - 3
    92101            code = code[:new_dot] + '.' + code[new_dot:]
    93         return u'%s-%s' % (code, verifier)
    94 
     102        return u'%s-%s' % (code, verifier)
     103 No newline at end of file
Back to Top