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 - Mo
Solution 1:
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.
Solution 2:
In 2021 MongoDB supports Py3 and Django with 3 Engines. Its PyMongo, MongoEngine and Djongo.
- PyMongo is the standard driver through which MongoDB can interact with Django.
- MongoEngine is similar to a Object-Relational-Mapper in relational databases
- djongo transpiles all the SQL queries to MongoDB syntax queries.
Post a Comment for "Setting Up Mongodb + Django"