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')
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')