django-toolbox: No module named from django.utils.importlib import import_module

1.6k Views Asked by At

I've the latest version of Django, django-toolbox and Python. I'm using MongoDB as DB and PyMongo. My problem is this: "No module named from django.utils.importlib import import_module"

This happens because I want to use Embedded Models and specifically, Lists of Subobjects (One-to-Many Relations) as you can see in the tutorial. Is there a way to solve this problem or to model the Lists of Subobjects in an another way? Thanks.

EDIT: I switched to Django 1.8 but now my error is

"name basestring is not defined"
1

There are 1 best solutions below

2
Alasdair On

The import

from django.utils.importlib import import_module

should be changed to

from importlib import import_module

I see you've opened a GitHub issue 78. Until that's fixed, you can use Django 1.8.