Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 13th, 2012  |  syntax: None  |  size: 0.38 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. from flask import Blueprint, abort, request
  2. from flaskext.mako import render_template
  3.  
  4. from project.forms.contact import ContactForm
  5.  
  6. contact = Blueprint('contact', __name__)
  7.  
  8. @contact.route('/', methods=["GET","POST"])
  9. def contact_page():
  10.     form = ContactForm(request.form)
  11.     if request.method == "POST":
  12.         print(request.method)
  13.     return render_template('contact.mako', form=form)