def contact(): forms = ContactUsForm() if forms.validate_on_submit(): contactus = ContactUs(name=forms.name.data, email=forms.email.data, address=forms.address.data,phone=forms.phone.data,comments=forms.comments.data) db.session.add(contactus) db.session.commit() #flash('hurreey account created','success') #return redirect(url_for('home')) #return redirect('contact') return render_template('index.html', forms=forms)
def contact_us(): form = ContactUsForm() if form.validate_on_submit(): print form.email.data, form.message.data return redirect("/") return render_template('/contact_us.html')