예제 #1
0
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)
예제 #2
0
파일: views.py 프로젝트: vtzk/dodo.md
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')
예제 #3
0
파일: views.py 프로젝트: vladutzik/dodo.md
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')