[Answered ]-How Can I save post requests to mongoengine using django forms?

2👍

If you use mongoengine>=0.8 then:

blog = Blog.from_json('''{
    "text": "My first blog post",
    "tags": [
        {"tag":"mongo"}, {"tag":"django"}
    ]
}''').save()

or if you already have dict:

blog = Blog._from_son({
    "text": "My first blog post",
    "tags": [
        {"tag":"mongo"}, {"tag":"django"}
    ]
}).save()
👤tbicr

Leave a comment