Uri style connections are also supported, just supply the uri as the :attr:`host`in the `'MONGODB_SETTINGS'` dictionary with `app.config`. **Note that database name from uri has priority over name.** ::

flask-mongoengine attaches the following methods to Mongoengine's default QuerySet:

* **get_or_404**: works like .get(), but calls abort(404) if the object DoesNotExist.* **first_or_404**: same as above, except for .first().* **paginate**: paginates the QuerySet. Takes two arguments, *page* and *per_page*.* **paginate_field**: paginates a field from one document in the QuerySet. Arguments: *field_name*, *doc_id*, *page*, *per_page*.