doableware / djongo

Django and MongoDB database connector
https://www.djongomapper.com
GNU Affero General Public License v3.0
1.86k stars 351 forks source link

NotImplementedError: Database objects do not implement truth value testing or bool(). Please compare with None instead: database is not None #673

Open marvellous10 opened 1 year ago

marvellous10 commented 1 year ago

NotImplementedError: Database objects do not implement truth value testing or bool(). Please compare with None instead: database is not None. This is when i use the pymongo latest version (4.4.0), downgrading to 3.12.3 works fine but it doesn't support NULL and CONSTRAINT completely.

Traceback

raise NotImplementedError( NotImplementedError: Database objects do not implement truth value testing or bool(). Please compare with None instead: database is not None

nubonics commented 11 months ago

this is because the djongo package itself only supports django 3

When using mongodb, you lose ORM functionality with django, so admin panel no longer is usable, and automatic migrations are no longer able to be used, in short, dont use mongodb with django :(

marvellous10 commented 11 months ago

So what can i use, i need what mongodb offers, i later downgraded but it's giving issues but I'm working around that