title: how to get mongoengine object id in flask program
body: <p>i am using mongoengine to integrate with flask , i wanted to know how to get document object id every time i try i get <code>File "/var/www/flask_projects/iot_mongo/app.py", line 244, in post return jsonify(user.id) AttributeError: 'BaseQuerySet' object has no attribute 'id'</code></p>
  
  <pre><code>class Test(Resource):
      def post(self):
          parser = reqparse.RequestParser()
          parser.add_argument('email',required=True, help='email')
          args=parser.parse_args()
          user=AdminUser.objects(email=args['email'])
          return jsonify(user.id)
  api.add_resource(Test,'/test')
  
  if __name__ == '__main__':
      app.run(debug=True) 
  </code></pre>