def get_users(user_id): factory = ModelFactory() user_info = factory.get(User, id=user_id) return jsonify(status=200, message='OK', body={ 'status': 200, 'message': 'OK', 'payload': user_info })
def get_product_detail(product_id): factory = ModelFactory() product = factory.get(Product, id=product_id) return render_template('product_detail.html', product=product)