Skip to content

Files

Latest commit

241b884 · Jul 14, 2014

History

History
This branch is up to date with NYC-DOE/flask-examples:master.

forms

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 14, 2014
Jun 25, 2014
Jul 14, 2014
Jun 30, 2014
Jun 30, 2014

Forms

We are importing something else at the top of the app.py file now. What is it?

Where do you see the 'request' object that we imported used?

Experiments

  • What happens after you fill in the form and click 'submit'. What does the URL look like?
  • Change the index.html file so that the form's method is "post" instead of "get". Now try reloading the index page and submitting the form. How does the url change? How is this different than when the form's method was 'get'?
  • Draw a diagram that shows the flow of information from one page to the next. Show each template file, and what is rendered on that page, and how the server responds to it.
  • Add another input field to your form for "favorite color". Make it so that the result page shows the favorite color that you filled in.