Facing trouble with djangotoolbox

387 views
Skip to first unread message

Sagar

unread,
Aug 18, 2018, 9:17:50 AM8/18/18
to Django users
Hello,
I am working on project in which I'm using django2 and MongoDB as database. I have used djongo driver to connect django with MongoDB. I don't have any experience with django or MongoDB. This is first time I have use both of these.
Currently I want to create Embedded documents in MongoDB. To do that I have Installed djangotoolbox. After creating model and writing other code when I run my project It is giving me this error "from django.utils.importlib import import_module ModuleNotFoundError: No module named 'django.utils.importlib'". When I search for this error on google I found this answer https://stackoverflow.com/questions/32761566/django-1-9-importerror-for-import-module. This answer is for older versions.
Even I tried this answer and then I got this error "from django.db.models.fields.subclassing import Creator ModuleNotFoundError: No module named 'django.db.models.fields.subclassing'".
Currently I'm stuck in my project. How can I solve this problem? Is there any other alternative way to do this? How to create Embedded documents in MongoDB using this library?
Here are the versions of frameworks and library I used in my project.
Django==2.1
django-rest-framework-mongoengine==3.3.1
djangorestframework==3.8.2
djongo==1.2.29
mongoengine==0.15.3
pymongo==3.7.1
djangotoolbox==1.8.0

Jason

unread,
Aug 18, 2018, 9:41:52 AM8/18/18
to Django users
according to the github repo, https://github.com/django-nonrel/djangotoolbox, hasn't been updated in three years, which means its probably not compatible with django 2.x

look for another lib?  or go from mongo to mysql/postgres, since db support for nosql/mongo in django is very weak.

Amine Hosni

unread,
Aug 20, 2019, 11:45:13 AM8/20/19
to Django users
Have you found any alternative solution please ? I'm stuck right were you were...
Reply all
Reply to author
Forward
0 new messages