Django

Code

Changeset 2544

Show
Ignore:
Timestamp:
03/21/06 12:31:31 (3 years ago)
Author:
jkocherhans
Message:

magic-removal: Fixed 'allow_tags' behavior for model methods in admin change lists.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/contrib/admin/templatetags/admin_list.py

    r2469 r2544  
    115115            try: 
    116116                attr = getattr(result, field_name) 
     117                allow_tags = getattr(attr, 'allow_tags', False) 
    117118                if callable(attr): 
    118119                    attr = attr() 
     
    123124                # Strip HTML tags in the resulting text, except if the 
    124125                # function has an "allow_tags" attribute set to True. 
    125                 if not getattr(attr, 'allow_tags', False)
     126                if not allow_tags
    126127                    result_repr = escape(result_repr) 
    127128        else: