Giter VIP home page Giter VIP logo

dojo_survey's Introduction

Assignment: Dojo Survey

Objectives:

  • Practice creating a server with Flask from scratch
  • Practice adding routes to a Flask app
  • Practice having the client send data to the server with a form
  • Practice redirecting after the POST request.
  • Use Session to display the form data on the result page.

image

Build a new Flask application that accepts a form submission and presents the submitted data on a results page.

The goal is to help you get familiar with sending POST requests through a form and displaying that information. Consider the below example as a guide.

When you build this, please make sure that your program meets the following criteria:

  • http://localhost:5000 - have this display a nice looking HTML form.ย  The form should be submitted to '/process'
  • Save form data into session.
  • http://localhost:5000/result - have this display a html with the information that was submitted by POST

Don't forget that any inputs we want to be able to access from the form submission need to have a name!

It's always a good idea to print request.form to see if the form is delivering all the information you need in your routing method. Markup : - [ ] An uncompleted task - [x] A completed task

  • Create a new Flask application

  • Have the root route ("/") show a page with the form

  • Have the "/result" route display the information from the form on a new HTML page

  • Put the form data into session

  • NINJA BONUS: Use a CSS framework to style your form

  • NINJA BONUS: Include a set of radio buttons on your form

  • SENSEI BONUS: Include a set of checkboxes on your form

dojo_survey's People

Contributors

andrewt-tran avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.