SHARE
TWEET

Untitled

a guest Sep 29th, 2017 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from flask import Flask, render_template
  2. app = Flask(__name__)
  3.  
  4. from flask_wtf import FlaskForm
  5. from wtforms import TextField
  6. class contactForm(FlaskForm):
  7.     name=TextField("textfield")
  8.  
  9. form=contactForm(csrf_enabled=False) #trying to access this object
  10.  
  11. @app.route("/wtf", methods=["get", "post"])
  12. def formView(form):
  13.     return render_template("form.htm", form=form) #here
  14.  
  15. @app.route("/abc", methods=["get", "post"])
  16. def formReturn():
  17.     return(a)
  18.  
  19. if __name__ == "__main__":
  20.     app.run(debug = True)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top