def order_field(field):
    """
    Sets 'admin_order_field' attribute (this attribute is used by list_display).
    """
    def decorator(func):
        func.admin_order_field = field
        return func
    return decorator