Exemple #1
0
def update(id):
    customer = Customer.get(id)

    if request.method == "POST":
        error = customer.request.update()

        if not error:
            return redirect(url_for('customer.customers'))

        flash(error)

    return render_template('customer/update.html',
                           heads=customer_heads,
                           customer=customer)
Exemple #2
0
def delete(id):
    customer = Customer.get(id)
    customer.delete()

    return redirect(url_for('customer.customers'))
Exemple #3
0
def profile(id):
    customer = Customer.get(id)

    return render_template('customer/profile.html', customer=customer)