Skip to content

Commit

Permalink
fix: fix compat (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshyu authored Mar 6, 2024
1 parent 76bbb04 commit 44f9029
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions djangocms_references/compat.py
Original file line number Diff line number Diff line change
@@ -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():
Expand All @@ -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()

0 comments on commit 44f9029

Please sign in to comment.