Skip to content
Advertisement

Setting up MongoDB + Django

I am new to Mongo DB and Django. I’ve been trying to use Mongo DB as my primary Database for Django. I’ve installed MongoDB and Django-nonrel as per the following link:

Django – MongoDB setup

The version of django-nonrel, i am using is 1.7. Clone link to it:

pip install git+https://github.com/django-nonrel/django@nonrel-1.7

After following all steps, my settings.py in the django project file looks something like this:

JavaScript

But while running the manage.py using the following command:

JavaScript

I am getting an error like this,

JavaScript

I am not able to understand what the error is. Can somebody please help.?

Advertisement

Answer

It seems that you are using Python 3. But django-mongodb-engine, on which django-nonrel depends, doesn’t even support Python 3 yet.

The syntax error above is actually valid in py3, but not in py2. Thus the error.

Perhaps you should consider using py2 for this project.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement