@classmethod
def _get_endpoint(cls):
    """Returns tuple in format: (controller|blueprint, action|view).
        """
    import ckan.common as common
    try:
        endpoint = tuple(common.request.endpoint.split('.'))
    except AttributeError:
        try:
            return common.c.controller, common.c.action
        except AttributeError:
            return None, None
    if len(endpoint) is 1:
        return endpoint + (None,)
    return endpoint
