Update mongoengine.rst
flask-mongoengine to flask-mongoengine2
This commit is contained in:
parent
7b5e176d1a
commit
10d32cb270
1 changed files with 6 additions and 6 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue