1

What are the differences between the Mongoengine, flask-MongoEngine and Django-MongoEngine projects?

I am using Mongoengine in my Django project. Will I get any benefits if I use Django-MongoEngine instead?

4 Answers 4

1

Django MongoEngine aim is to provide better integration with Django - however currently (June 2014) its not stable and the readme says

DO NOT CLONE UNTIL STABLE

So beware!

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks @Ross so for time being I will continue with Mongoengine in future will it be possible to migrate my code in Django-MongoEngine ?
Not sure Django-MongoEngine looks stalled at the moment
1

In addition to the other answers, flask mongoengine adds support for wtforms. If your not using flask admin, or doing server side rendering, chances are you don't need flask-mongoengine. You can just go with mongoengine

Comments

0

flask-mongoengine adds a few helpers to integrate MongoEngine into a Flask application.

  • Connection definition in Flask parameters
  • get_or_404 / first_or_404 shortcuts (abort 404 if document not found)
  • paginator added to QuerySet object
  • automatic form generation using WTForms

django support was pulled off Mongoengine into a separate code (django-mongoengine). Although it has no release, it seems to be worked on (see the recent commits).

Comments

0

Django framework provides a unified unified interface to connect to a Database backend which is usually an SQL based database such as SQLite or Postgresql. That means that the developer does not have to worry about writing code specific to the database technology used, but defines Models and perform transactions and run all kinds of queries using the Django database interface. Flask does the same.

Django does not support MongoDB from the get-go. To interact with MongoDB databases, Collections and Documents using Python one would use the PyMongo package, that has a different syntax, and paradigms than Django Models or Flask's.

MongoEngine wraps PyMongo in way that provides a Django-like Database for MongoDB.

MongoEngine-Django tries to allow Django web-apps developers to use a Mongo database as the web-app backend. To provide the Django Admin, Users, Authentication and other database related features that are available in Django usually with an SQL backend.

MongoEngine-Flash tries to allow Flask web-apps developers to use a Mongo database as the web-app backend.

Personally, I prefer using a structured SQL database for the web-app essentials, and PyMongo, or MongoEngine to interface with any further Mongo Databases where unstructured big data might reside...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.