once split at the '.' value under the 'ENGINE' key of the connection.settings_dict dictionary, substitute last element of the result for backend_name.
backend_name = connection . settings_dict [ 'ENGINE' ] . split ( '.' ) [ - 1 ]