From bf2aa097e1fccac26641da5d7851f6e5f45cac99 Mon Sep 17 00:00:00 2001 From: Henry Cagnini Date: Thu, 4 Sep 2025 15:56:58 -0300 Subject: [PATCH] added compatibility with django 5.2 --- .idea/.gitignore | 8 ++++++++ .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/misc.xml | 7 +++++++ .idea/modules.xml | 8 ++++++++ .idea/python-ibmdb-django.iml | 12 ++++++++++++ .idea/vcs.xml | 7 +++++++ ibm_db_django/compiler.py | 5 ++++- 7 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/python-ibmdb-django.iml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..d65d33f --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..83964ed --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/python-ibmdb-django.iml b/.idea/python-ibmdb-django.iml new file mode 100644 index 0000000..e249242 --- /dev/null +++ b/.idea/python-ibmdb-django.iml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..8306744 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/ibm_db_django/compiler.py b/ibm_db_django/compiler.py index 51ecfe9..87066c5 100644 --- a/ibm_db_django/compiler.py +++ b/ibm_db_django/compiler.py @@ -18,7 +18,10 @@ from django.db.models.sql import compiler import sys -from django.db.models.functions.comparison import JSONObject +try: + from django.db.models.functions.json import JSONObject +except ImportError: + from django.db.models.functions.comparison import JSONObject if sys.version_info >= (3, ): try: