Exemple #1
0
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
                   })
Exemple #2
0
def get_product_detail(product_id):
    factory = ModelFactory()
    product = factory.get(Product, id=product_id)

    return render_template('product_detail.html', product=product)