Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from flask import Flask, render_template
- app = Flask(__name__)
- from flask_wtf import FlaskForm
- from wtforms import TextField
- class contactForm(FlaskForm):
- name=TextField("textfield")
- form=contactForm(csrf_enabled=False) #trying to access this object
- @app.route("/wtf", methods=["get", "post"])
- def formView(form):
- return render_template("form.htm", form=form) #here
- @app.route("/abc", methods=["get", "post"])
- def formReturn():
- return(a)
- if __name__ == "__main__":
- app.run(debug = True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement