Start by creating a new branch in I211_flask called "unit-2"
It must be in I211_flask!
All event data should be stored in the file 'events.csv'
The file should contain AT LEAST 4 headers: name, date, host, description
All templates should extend base.html
You may use the existing bootstrap styles from I211_practice OR use any of the bootstrap hero styles found at https://getbootstrap.com/docs/5.1/examples/heroes/ (Links to an external site.)
base.html must contain:
A header/navigation
A main containing a <div class="container"
A footer
Route: /
Template: index.html
Create a homepage for your application
This page must contain the following:
logo
title
description
a button that takes you to the /events/ route
Route: /events/
Template: events.html
This page will list the date and name of all events, pulling the data in from 'events.csv'
Events should be ordered by date with oldest on top
Each event name should be a link to the individual event page (route /events/<event_id>) by event ID
The page should contain a button link to create a new event (route /events/create)
Route: /events/<event_id>
Template: event.html
This page will contain all of the data for the event:
Event name, date, host, description.
The page will also contain button links to:
Edit the event (route: /events/<event_id>/edit)
Delete the event (route: /events/<event_id>/delete)
Route: /events/create
Template: event_form.html
This page will contain a form to collect all of the data for the event:
Event name, date, host, description.
The form will also contain reset and submit buttons
Upon submission, the event data will be added to the events.csv file and the page will redirect to the /events/ route.
Route: /events/<event_id>/edit
Template: event_form.html
This page will contain the same form from /event/create to collect all of the data for the event:
Event name, date, host, description.
The form will also contain reset and submit buttons
The pre-existing event data should be loaded into the form fields
Upon submission, the relevant event data will be changed in the events.csv file and the page will redirect to the /event/<event_id> route.
Route: /events/<event_id>/delete
Template: delete_form.html
Presents a delete confirmation page for the event specified by <event_id>:
Display “Confirm Delete?”
Show the description for the event
The “Go Back” button takes the user back to the /event/<event_id>/ page without deleting the event.
The “Delete” button will delete the event data from the events.csv file and redirect back to the /events/ route.
0 comments:
Post a Comment