@classmethod
def _check_ckan_version(cls, min_version=None, max_version=None):
    """Return ``True`` if the CKAN version is greater than or equal to
        ``min_version`` and less than or equal to ``max_version``,
        return ``False`` otherwise.

        If no ``min_version`` is given, just check whether the CKAN version is
        less than or equal to ``max_version``.

        If no ``max_version`` is given, just check whether the CKAN version is
        greater than or equal to ``min_version``.

        :param min_version: the minimum acceptable CKAN version,
            eg. ``'2.1'``
        :type min_version: string

        :param max_version: the maximum acceptable CKAN version,
            eg. ``'2.3'``
        :type max_version: string

        """
    current = cls._version_str_2_list(cls.ckan.__version__)
    if min_version:
        min_required = cls._version_str_2_list(min_version)
        if current < min_required:
            return False
    if max_version:
        max_required = cls._version_str_2_list(max_version)
        if current > max_required:
            return False
    return True
