Created
August 30, 2011 02:46
-
-
Save EnigmaCurry/1180050 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.register_blueprint(view.contact, url_prefix="/contact") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Blueprint, abort, request | |
from flaskext.mako import render_template | |
from project.forms.contact import ContactForm | |
contact = Blueprint('contact', __name__) | |
@contact.route('/', methods=["GET","POST"]) | |
def contact_page(): | |
form = ContactForm(request.form) | |
if request.method == "POST": | |
print(request.method) | |
return render_template('contact.mako', form=form) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment