O'Reilly logo

Learning Django Web Development by Ratan Kumar, Sanjeev Jaiswal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The single-page application project – URL shortener

There are two ways in which MongoDB can be used with Django, which are as follows:

  • MongoEngine: This is a Document-object Mapper (think of ORM, but for document databases) that is used to work with MongoDB from Python
  • Django non-rel: This is a project to support Django on nonrelational (NoSQL) databases; currently it supports MongoDB

MongoEngine

Installation of MongoEngine is required before we move further and show you how to configure MongoEngine with Django. Install MongoEngine by typing the following command:

sudo pip install mongoengine 

In order to protect the previous project we created, and to better understand, we will create a separate new project for MongoDB configuration, and we will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required