I am working on mongoengine with Python3. I am trying to save one user at atime.
Users.objects.insert(user, load_bulk=False)
Printing this is giving me and ObjectId but still I am not able to see insert data in database.
I am working on mongoengine with Python3. I am trying to save one user at atime.
Users.objects.insert(user, load_bulk=False)
Printing this is giving me and ObjectId but still I am not able to see insert data in database.
I have just been using the save() method. You can use it to save and update objects.
user = Users(
parameter1="",
parameter2="",
parameter3="")
user.save()
To update I'll do this
user = User.objects.get(pk='ObjectId goes here')
user.parameter1 = ""
user.parameter2 = ""
user.parameter3 = ""
user.save()