Showing posts with the label mongoengine

[FIXED] Mongoengine: ConnectionError: You have not defined a default connection

Issue In my new Django project I set up a MongoDB database and use mongoengine module but I can'…

[FIXED] How to query mongoengine by using contains in list?

Issue If I have a collection with a list field similar to the below. class Post(Document): tags…

[FIXED] MongoEngine: difference between EmbeddedDocumentListField() and ListField(EmbeddedDocumentField())?

Issue title. are those two statements do the same thing, or am I missing something here? cars = d…

[FIXED] Adding and updating ListField with Mongoengine

Issue Using Mongoengine and trying to form a tag cloud. To each item I would like to attach one or …

[FIXED] Updating an embedded document in mongoengine

Issue I have a class in mongoengine class Post(EmbeddedDocument): uid = StringField(requir…

[FIXED] Flask Mongoengine how to check unique field case insensitive

Issue I have googled and googled for an answer, but I can't seem to find one. How do I make mo…

[FIXED] Querying a list in mongoengine; contains vs in

Issue I have a ListField in a model with ids (ReferenceField), and I need to do a query if a certai…

[FIXED] Classical mapping in MongoEngine

Issue I'm new to MongoEngine and it looks like we need to create sub classes of the class Docum…

[FIXED] Does mongo db ListField maintain ordering?

Issue If I add items to a ListField on a mongo db document in a specific order and then write it to…

[FIXED] pre_save not working in mongoengine update_one

Issue I am using Python mongoengine and I would like to define callback, which will be called every…

[FIXED] MongoEngine delete document

Issue I have the following MongoEngine document { '_id': 'some_id', '…

[FIXED] Mongoengine How to Filter with ISODate

Issue I'm trying to convert a query string into Mongoengine. The filter is looking at an array …

[FIXED] Simple document creation failing with mongoengine module in Python with AttributeError:_initialised

Issue I am trying to create very simple document in my mongo DB using mongoengine as a first step. …

[FIXED] Calling certain functions when initializing a new mongoengine document

Issue I'm trying to define a Document class that has some fields that have their values automat…

[FIXED] Iterating Mongoengine queryset - how to prevent big memory consumption

Issue In my deployment environment I am trying to run a script with a loop similar to the one below…

[FIXED] Autoincrement with MongoEngine

Issue I'm developing a blog engine with Flask and MongoEngine, and I need sequential IDs for my…

[FIXED] How can I transpose a list of documents in MongoDB?

Issue I have a document like: { "_id": "6345e01473144cec0073ea95", "…

[FIXED] How can I find if any user with given ID exists on an array of arrays using flask and mongoengine?

Issue I have a collection with multiple Course documents. On it, i have an array of course_users li…

[FIXED] When would I use an external serializer like marshmallow over monogoengine's in-built JSON serialization (from_json and to_json)?

Issue I am writing a simple REST API in Python using Flask-RESTful and their href="https://fl…

[FIXED] Flask-restful How to `marshal_with()` data in reference_field of mongoengine?

Issue I use Flask-restful and MongoEngine ,I want to show the data in ReferenceField of my model …