Work Session - v0.3.0

Read the directions for the Project

  • View the assignment in Canvas
  • Canvas > Modules > Week 4 > What to Do in Week 4

Sketch the interactions

Once again, the goal is to sketch the user interaction, indicating pseudo code and access to data along the way. This time there is still data coming from a CSV, but now we will also focus on what we need from various forms.

Divide a piece of paper into three sections.

  • Label the first section gardens.html
  • Label the second section app.py
  • Label the third section garden-form.html

sketch of an interaction from project v0.3.0

In the first section, the user clicks on a “Add a New Garden” button. Indicate the button and how you would write the link using Jinja. Do we need to send any data through to the app? If so, indicate that too.

Draw an arrow to the middle section.

In the second section, indicate:

  • @Route: e.g. gardens/add/
  • Function definition: e.g. add_garden()
  • Template to render: e.g. garden_form.html
  • Any data that needs to be processed, gathered and/or sent on to the HTML page

Don’t worry about writing the code here. Just write down the important bits.

Draw an arrow to the third section. Indicate any data that has been passed to the page, and note what the page is for (e.g. Add Garden page)

Repeat this process for the second half of this route, and for the rest of the routes we have asked you to create. Reference your interaction sketches as you code.

Begin coding

Begin coding, keeping in mind the entire user interaction from a click on a link, to the route in app.py, to the resulting rendered HTML template.