djongo icon indicating copy to clipboard operation
djongo copied to clipboard

¿djongo 1.3.6 is compatible with django 4.0.1?

Open CamiloxCa opened this issue 3 years ago • 12 comments

error:

django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available database backend or couldn't be imported. Check the above exception. To use one of the built-in backends, use 'django.db.backends.XXX', where XXX is one of:
    'mysql', 'oracle', 'postgresql', 'sqlite3'

pip freeze:

Package            Version
------------------ -------
asgiref            3.4.1
backports.zoneinfo 0.2.1
**Django             4.0.1
djongo             1.3.6**
pip                20.0.2
pkg-resources      0.0.0
pymongo            4.0.1
setuptools         44.0.0
sqlparse           0.2.4
wheel              0.34.2

¿versions are compatible?

CamiloxCa avatar Jan 19 '22 21:01 CamiloxCa

Hi Just install pytz !

pip install pytz 😉

MrYazdan avatar Jan 24 '22 10:01 MrYazdan

downgrade to Pymongo 3.12.1

cybera3s avatar Jan 24 '22 11:01 cybera3s

Hi Just install pytz !

pip install pytz 😉

Works for me. thx

Why we not adding a dependency to install_requires in setup.py?

kemen209 avatar Feb 04 '22 11:02 kemen209

downgrade to Pymongo 3.12.1

This fix another issue for me.

kemen209 avatar Feb 04 '22 14:02 kemen209

Djongo version 1.3.6 is very much compatible with Django version 4.0.1

As of this issue #585 I used Django 3.0.3 and it works but I also tried using Django 4.0.1 and seems all to be working fine.

Installed Django==4.0.1


image

As stated in my requirements.txt file:


image

Running the dev server works fine:


image

MikeTeddyOmondi avatar Feb 04 '22 15:02 MikeTeddyOmondi

downgrade to Pymongo 3.12.1

it work for me!

huangsiyuan924 avatar Mar 18 '22 09:03 huangsiyuan924

ostgresql', 'sqlite3'

thanks

ValdoMpinga avatar May 11 '22 17:05 ValdoMpinga

I am using the latest branch of Djongo and sqlparse 0.4.2 with Django 4.0.5

when trying to use the django orm, I got djongo.exceptions.SQLDecodeError error filter with __contains/__icontains/__regex/__istartswith/__startwith etc. but the sql string is correct. I am not so sure if this is due to sqlparse 0.4.2, but a downgrade to sqlparse 0.2.4 breaks previous migrations.

also when using nested embedded fields and setting db_column in the inner embedded field, in FormField._validate_container() the check field.attname != field.column gets triggered, causing a validation error. A monkeypatched subclass commenting out this check got me around this problem.

cathug avatar Jul 24 '22 08:07 cathug

Hello,

Djongo requires sqlparse==0.2.4 when django requires sqlparse>=0.2.2.

i don't understand this choice. same for django 4.0.1

therougeb avatar Nov 08 '22 18:11 therougeb

💚💛🧡❤️💜💙

downgrade to Pymongo 3.12.1

i did pip install pytz and it threw a new error

pip install pymongo==3.12.1

after i did both it totally worked for me .... THANK YOU !!!!

🌈😸💥🔥 🌹🌹🌹🌹 ✊✊✊✊

oxbits avatar Dec 31 '22 17:12 oxbits

There is still dependencies issues please. This is my requirements.in file with the main packages only where I commented their versions compiled with pip-tools:

Django>=4.2.6,<4.3               # 4.2.6 -- I want to work with the latest LTS version
djangorestframework              # 3.14
djongo                           # 1.2.31 -- compiled while the latest is 1.3.6 which is better for security and bug issues
dnspython                        # 2.4.2
pymongo                          # 4.5.0
pytz                             # 2023.3.post1 -- from DRF if applied before djongo
sqlparse                         # 0.4.4 -- where django 4.2.6 requires sqlparse>= 0.3.1 and djongo 1.3.6 requires sqlparse==0.2.4

When I force with djongo>=1.3.6, there are dependency conflicts raised saying the comment on sqlparse. Please how can a djongo downgraded package accepts a higher version of sqlparse but its latest does not if (I am right)? My issues, please is djongo 1.3.* compatible with Django latest LTS (4.2.*)? Or is there any workaround here?

MistaIA avatar Oct 22 '23 14:10 MistaIA

There is still dependencies issues please....

Django>=4.2.6,<4.3               # 4.2.6 -- I want to work with the latest LTS version
djangorestframework              # 3.14
djongo                           # 1.2.31 -- compiled while the latest is 1.3.6 which is better for security and bug issues
dnspython                        # 2.4.2

.... also faced with this problem. But I wanted to upgrade from version 3 to version 4.2.6, and I saw this incompatibility. Djongo has not been updated for a long time... Perhaps we can ask the author to repair it, or make a fork. So far I am using Django 4.1.13 and djongo 1.3.6 and there is no dependency conflicts in it

alexey-gulyaev-redshelf avatar Nov 08 '23 23:11 alexey-gulyaev-redshelf