Emil Rojewski
Emil Rojewski

Reputation: 104

Django mongodb auth with mongoengine error

I try to extend basic user document from mongo and normally i would do it like this:

from mongoengine.django.auth import User

class Account(User):
    field1=something1
    field2=something2

etc.

Somehow i just can't import django.auth from mongoengine. It just says: ImportError: No module named django.auth

And actually it worked for me couple of months ago and that is why i am confused.

I have installed django, and then according to the docs: django-nonrel, djangotoolbox, mongodb engine all in virtual env.

Then i've installed mongoengine using pip.

In settings.py i also included in installed apps 'mongoengine' and it worked fine, but i still can't import django.auth.

Am i missing something here?

Upvotes: 1

Views: 556

Answers (1)

Emil Rojewski
Emil Rojewski

Reputation: 104

Problem solved.

Just for anyone that will be struggling with this.

django.auth or even mongoengine.django is not included in mongoengine 0.10 as it seems but it is in 0.9 so i downgraded it.

Also to get connection working properly i needed to update pymongo from 2.7.1 to 2.8.1 and now it all works fine.

Upvotes: 0

Related Questions