djongo icon indicating copy to clipboard operation
djongo copied to clipboard

Not working for django version greater than 3.0

Open srikarreddy opened this issue 5 years ago • 18 comments

One line description of the issue

Unable to integrate into Django version greater than 3.0

ERROR: djongo 1.3.0 has requirement django<3,>=2.0, but you'll have django 3.0.3 which is incompatible.

Getting following errorr when django downgraded to 2.2.10

django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available database backend.

srikarreddy avatar Feb 04 '20 11:02 srikarreddy

Even if you get around the requirements issue you still get this -

django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
    'mysql', 'oracle', 'postgresql', 'sqlite3'

radzhome avatar Feb 20 '20 19:02 radzhome

+1. need immediate fix for this @nesdis

softmarshmallow avatar Feb 26 '20 12:02 softmarshmallow

Use django 2.2.10, and uninstall bson and remove the directory. Then go in the pymongo github repo (https://github.com/mongodb/mongo-python-driver.git) and clone it. Replace the bson directory you removed with the new cloned directory

$ pip uninstall bson
$ rm -rf [Your Bson Directory]
$ git clone https://github.com/mongodb/mongo-python-driver.git
$ cd mongo-python-driver
$ cp bson [Your Bson Directory]

jay20162016 avatar Mar 01 '20 20:03 jay20162016

Your bson directory could be found when installing, in case you don't know:

$ pip uninstall bson
Found existing installation: bson 0.5.8
Uninstalling bson-0.5.8:
  Would remove:
    /Users/jayjay/anaconda3/envs/djongo/lib/python3.8/site-packages/bson-0.5.8.dist-info/*
    /Users/jayjay/anaconda3/envs/djongo/lib/python3.8/site-packages/bson/*
  Would not remove (might be manually added):
    /Users/jayjay/anaconda3/envs/djongo/lib/python3.8/site-packages/bson/_cbson.cpython-38-darwin.so
    /Users/jayjay/anaconda3/envs/djongo/lib/python3.8/site-packages/bson/binary.py

It would be the /Users/jayjay/anaconda3/envs/djongo/lib/python3.8/site-packages/bson/ that you remove.

jay20162016 avatar Mar 01 '20 20:03 jay20162016

Use django 2.2.10, and uninstall bson and remove the directory. Then go in the pymongo github repo (https://github.com/mongodb/mongo-python-driver.git) and clone it. Replace the bson directory you removed with the new cloned directory

$ pip uninstall bson
$ rm -rf [Your Bson Directory]
$ git clone https://github.com/mongodb/mongo-python-driver.git
$ cd mongo-python-driver
$ cp bson [Your Bson Directory]

this worked for me thanks a lot dude.

stgoirh avatar Mar 04 '20 20:03 stgoirh

Use django 2.2.10, and uninstall bson and remove the directory. Then go in the pymongo github repo (https://github.com/mongodb/mongo-python-driver.git) and clone it. Replace the bson directory you removed with the new cloned directory

$ pip uninstall bson
$ rm -rf [Your Bson Directory]
$ git clone https://github.com/mongodb/mongo-python-driver.git
$ cd mongo-python-driver
$ cp bson [Your Bson Directory]

can confirm that this workaround works. I got a wagtail installation running with this.

Tafhim avatar Mar 07 '20 18:03 Tafhim

+1 @nesdis please awaiting for this support

tiholic avatar Mar 11 '20 18:03 tiholic

I made a fork for the eventual git pull. Once I can get it to pass tox, I'll make the request. Currently running into a TypeError when running tests against v2.2, so if anyone wants to help, I'd be grateful.

https://github.com/fsecada01/djongo/tree/master

fsecada01 avatar Mar 17 '20 17:03 fsecada01

I already have a PR at https://github.com/nesdis/djongo/pull/374 https://github.com/nesdis/djongo/pull/374, but it currently does not have tests.

On Mar 17, 2020, at 1:47 PM, Francis Secada [email protected] wrote:

I made a fork for the eventual git pull. Once I can get it to pass tox, I'll make the request. Currently running into a TypeError when running tests against v2.2, so if anyone wants to help, I'd be grateful.

https://github.com/fsecada01/djongo/tree/master https://github.com/fsecada01/djongo/tree/master — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nesdis/djongo/issues/364#issuecomment-600209639, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2ZVVHFXWY736OWV7GTXJ3RH6ZUBANCNFSM4KPVLU5A.

jay20162016 avatar Mar 17 '20 17:03 jay20162016

Hello, I am integrating a mongo database into my project. I can absolutly not roll back to django 2.x. Should I use another connector ? :)

RomikimoR avatar Mar 18 '20 11:03 RomikimoR

I already have a PR at #374 <#374>, but it currently does not have tests. On Mar 17, 2020, at 1:47 PM, Francis Secada @.***> wrote: I made a fork for the eventual git pull. Once I can get it to pass tox, I'll make the request. Currently running into a TypeError when running tests against v2.2, so if anyone wants to help, I'd be grateful. https://github.com/fsecada01/djongo/tree/master https://github.com/fsecada01/djongo/tree/master — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#364 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2ZVVHFXWY736OWV7GTXJ3RH6ZUBANCNFSM4KPVLU5A.

That PR is only compatible with Python3.6. My fork will hopefully be compatible with 3.6+ onward.

Also, is it important for six to be used throughout the build since Python2 is EOL?

fsecada01 avatar Mar 18 '20 13:03 fsecada01

I have python 3.8.1 and the build works.

jay20162016 avatar Mar 18 '20 13:03 jay20162016

Then could you add testing for python3.7 and 3.8 environments in the tox.ini file of your pull?

fsecada01 avatar Mar 18 '20 15:03 fsecada01

Sorry, but I don't know how to add testing :-(

jay20162016 avatar Mar 18 '20 15:03 jay20162016

You can add this to the environment list, and Travis CI should be able to spin out new virtualenvs with the python versions.

envlist =
    py36-django{21, _stable}
    py37-django{21, _stable}
    py38-django{21, _stable}

fsecada01 avatar Mar 18 '20 15:03 fsecada01

I'm using Django 3.1, and got error like this: djongo 1.3.3 requires django<=3.0.5,>=2.1

mrhaoji avatar Sep 02 '20 16:09 mrhaoji

Is there any intention to support Django 3.1.* in (near) future? Anybody caring about this?

MatthiasLohr avatar Nov 22 '20 12:11 MatthiasLohr

Is it still accepting max. Django 3.0? Django 4.0 is already out... I was thinking about implementing it into my new big project but now I am not sure.

svagier avatar Jan 05 '22 08:01 svagier