Ticket #10293: m2m_raw_id_field_improvement.patch

File m2m_raw_id_field_improvement.patch, 553 bytes (added by joaoolavo@…, 16 years ago)

Patch with the improvement

  • widgets.py

    old new  
    169169        return self.base_url_parameters()
    170170   
    171171    def label_for_value(self, value):
    172         value = [int(v) for v in value.split(',')]
    173         objs = self.rel.to._default_manager.filter(pk__in=value)
    174         return '&nbsp;<strong>%s</strong>' % ',&nbsp;'.join(truncate_words(obj, 14) for obj in objs)
     172        return ''
    175173
    176174    def value_from_datadict(self, data, files, name):
    177175        value = data.get(name, None)
Back to Top