コード例 #1
0
 def createReport(self, params):
     # construct a report object from the gathered data
     report = Report(params[0], self.__getCar(params[1]), params[2], params[3])
     # update the database with the new report and respond with a confirmation of insertion
     db.insertObject('reports', Report.attributesAsList(), report.asTuple())
     return jsonify({'report': report.asDict()}), 201