Changeset 8028 for libcommonDjango

Show
Ignore:
Timestamp:
11/19/08 17:25:42 (2 months ago)
Author:
fredz
Message:

*** empty log message ***

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libcommonDjango/django/pimentech/validationforms.py

    r8027 r8028  
    1111from sets import Set 
    1212from django.utils.translation import gettext_lazy 
     13from itertools import chain 
    1314 
    1415 
     
    4950        output = [u'<select multiple="multiple"%s>' % forms.flatatt(final_attrs)] 
    5051        str_values = set([smart_unicode(v) for v in value]) # Normalize to strings. 
    51         for option_value, option_label in forms.chain(self.choices, choices): 
     52        for option_value, option_label in chain(self.choices, choices): 
    5253            option_value = smart_unicode(option_value) 
    5354            selected_html = (option_value in str_values) and ' selected="selected"' or '' 
     
    6465        output = [u'<ul>'] 
    6566        str_values = set([smart_unicode(v) for v in value]) # Normalize to strings. 
    66         for i, (option_value, option_label) in enumerate(forms.chain(self.choices, choices)): 
     67        for i, (option_value, option_label) in enumerate(chain(self.choices, choices)): 
    6768            # If an ID attribute was given, add a numeric index as a suffix, 
    6869            # so that the checkboxes don't all have the same ID attribute.