Exemplo n.º 1
0
def add():
    data = dict(request.form.items())
    if data.get('username', None):
        Farmer.add(
            username=data.get('username', 'janelodipo'),
            email=data.get('email', '*****@*****.**'),
            phone=data.get('phone', 10),
        )

    return render_template('farmers.html')
Exemplo n.º 2
0
def add():
    data = dict(request.form.items())
    if data.get('username', None):
        Farmer.add(
            username=data.get('username', 'faryda'),
            email=data.get('email', '*****@*****.**'),
            phone=data.get('phone', 10),
            password=data.get('password', 'farida01'),
        )

    return render_template('farmers.html')