Update mongoengine.rst

flask-mongoengine to flask-mongoengine2
This commit is contained in:
Ahmet Elgün 2024-01-18 18:07:54 +03:00 committed by GitHub
parent 7b5e176d1a
commit 10d32cb270
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,12 +5,12 @@ Using a document database like MongoDB is a common alternative to
relational SQL databases. This pattern shows how to use relational SQL databases. This pattern shows how to use
`MongoEngine`_, a document mapper library, to integrate with MongoDB. `MongoEngine`_, a document mapper library, to integrate with MongoDB.
A running MongoDB server and `Flask-MongoEngine`_ are required. :: A running MongoDB server and `Flask-MongoEngine2`_ are required. ::
pip install flask-mongoengine pip install flask-mongoengine2
.. _MongoEngine: http://mongoengine.org .. _MongoEngine: http://mongoengine.org
.. _Flask-MongoEngine: https://flask-mongoengine.readthedocs.io .. _Flask-MongoEngine2: https://flask-mongoengine2.readthedocs.io
Configuration Configuration
@ -20,7 +20,7 @@ Basic setup can be done by defining ``MONGODB_SETTINGS`` on
``app.config`` and creating a ``MongoEngine`` instance. :: ``app.config`` and creating a ``MongoEngine`` instance. ::
from flask import Flask from flask import Flask
from flask_mongoengine import MongoEngine from flask_mongoengine2 import MongoEngine
app = Flask(__name__) app = Flask(__name__)
app.config['MONGODB_SETTINGS'] = { app.config['MONGODB_SETTINGS'] = {
@ -99,5 +99,5 @@ There are many more ways to define and query documents with MongoEngine.
For more information, check out the `official documentation For more information, check out the `official documentation
<MongoEngine_>`_. <MongoEngine_>`_.
Flask-MongoEngine adds helpful utilities on top of MongoEngine. Check Flask-MongoEngine2 adds helpful utilities on top of MongoEngine. Check
out their `documentation <Flask-MongoEngine_>`_ as well. out their `documentation <Flask-MongoEngine2_>`_ as well.