Ayush Kothari
Ayush Kothari

Reputation: 13

Does django version 1.11 work with djongo package?

When I try to run the server using django==1.11 I get this error.

from djongo import models

File "/usr/local/lib/python3.6/dist-packages/djongo/models/__init__.py", line 3, in <module>
from .fields import (
File "/usr/local/lib/python3.6/dist-packages/djongo/models/fields.py", line 28, in <module>
from django.db.models.fields.mixins import FieldCacheMixin
ModuleNotFoundError: No module named 'django.db.models.fields.mixins'

But when I try doing the same using django==2 everything works fine. Nothing regarding the Django version is given in the docs: https://nesdis.github.io/djongo/get-started/

The requirements.txt file in djongo on Github says it does support django==1.11.

sqlparse>=0.2.3
pymongo>=3.2.0
django>=1.11

Any help is appreciated.

Upvotes: 0

Views: 296

Answers (2)

Ayush Kothari
Ayush Kothari

Reputation: 13

So I found out what the issue was.Djongo package version==1.2.23 works with django==1.11

Upvotes: 0

Alasdair
Alasdair

Reputation: 308939

The django.db.models.fields.mixins file is new in Django 2.0 (here is the commit where it was added).

If djongo imports this file, then it doesn't support Django 1.11.

Upvotes: 2

Related Questions