I would like to save the reference field along with object in post request. Is there any way to do this?
For eg.
class User(db.Document):
name = db.StringField(required=True, unique=True)
class Post(db.Document):
# Some fields
# ...
author = db.ReferenceField(User)
Now, I want to create author while making a POST request:
/post/ => { "author": { "name": "Test" }, ..other fields }
I would like to save the reference field along with object in post request. Is there any way to do this?
For eg.
Now, I want to create author while making a POST request: /post/ => { "author": { "name": "Test" }, ..other fields }