'Get the name of the item to be used in the context.'

def get_context_object_name(self, object_list):

    if self.context_object_name:
        return self.context_object_name
    elif hasattr(object_list, u'model'):
        return (u'%s_list' % object_list.model._meta.object_name.lower())
    else:
        return None
