We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 851e987 commit cf95dddCopy full SHA for cf95ddd
docs/index.rst
@@ -74,6 +74,16 @@ Connection settings may also be provided individually by prefixing the setting w
74
app.config['MONGODB_USERNAME'] = 'webapp'
75
app.config['MONGODB_PASSWORD'] = 'pwd123'
76
77
+By default flask-mongoengine open the connection when extension is instanciated but you can configure it
78
+to open connection only on first database access by setting the ``MONGODB_SETTINGS['connect']`` parameter
79
+or its ``MONGODB_CONNECT`` flat equivalent to ``False``::
80
+
81
+ app.config['MONGODB_SETTINGS'] = {
82
+ 'host': 'mongodb://localhost/database_name',
83
+ 'connect': False,
84
+ }
85
+ # or
86
+ app.config['MONGODB_CONNECT'] = False
87
88
Custom Queryset
89
===============
0 commit comments