1 # -*- coding: utf-8 -*-
 2 
 3 # 导入一个蓝图
 4 from flask import Blueprint
 5 from graphics.utils import http_content_util
 6 from graphics.db_utils import car as db_util
 7 
 8 car_bp = Blueprint('car', __name__)
 9 
10 @car_bp.route('/new', methods=['POST', 'GET'])
11 def new_car():
12     car_id, model, plate_number = http_content_util.get_param_get_or_post("car_id", "model", "plate_number")
13     try:
14         db_util.insert_car(car_id, model, plate_number)
15         return http_content_util.response_ok()
16     except Exception as e:
17         return http_content_util.response_error(str(e))

 

相关文章:

  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-07-07
  • 2021-05-14
  • 2022-01-15
  • 2021-04-14
猜你喜欢
  • 2022-03-08
  • 2021-10-28
  • 2021-09-15
  • 2021-05-26
  • 2021-12-01
  • 2021-05-01
相关资源
相似解决方案