Ticket #11447: 11447_fk_nowrap.diff

File 11447_fk_nowrap.diff, 844 bytes (added by julien, 4 years ago)
  • django/contrib/admin/templatetags/admin_list.py

    diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py
    index 7d4d8cd..bbe4b64 100644
    a b def items_for_result(cl, result, form): 
    163163                        result_repr = escape(field_val)
    164164                else:
    165165                    result_repr = display_for_field(value, f)
    166                 if isinstance(f, models.DateField) or isinstance(f, models.TimeField):
     166                if isinstance(f, models.DateField)\
     167                or isinstance(f, models.TimeField)\
     168                or isinstance(f, models.ForeignKey):
    167169                    row_class = ' class="nowrap"'
    168170        if force_unicode(result_repr) == '':
    169171            result_repr = mark_safe(' ')
Back to Top