diff --git a/djangocms_references/compat.py b/djangocms_references/compat.py index 31b2afd..f5d98c8 100644 --- a/djangocms_references/compat.py +++ b/djangocms_references/compat.py @@ -1,9 +1,10 @@ from cms import __version__ as cms_version -from packaging.version import Version - -DJANGO_CMS_4_1 = Version(cms_version) >= Version('4.1') +try: + from packaging.version import Version +except ModuleNotFoundError: + from distutils.version import LooseVersion as Version def is_versioning_installed(): @@ -15,4 +16,7 @@ def is_versioning_installed(): return True +DJANGO_CMS_4_1 = Version(cms_version) >= Version('4.1') + + VERSIONING_INSTALLED = is_versioning_installed()