Due Date: Wednesday, April 27th, 11:59:59 PM
Value: 150 points
Github Invite: Click Here
Collaboration: For Assignment 6, collaboration is not allowed; you must work individually. You may still come to office hours for help, but you may not work with any other CMSC 210 students. You may post questions on Discord, but you may not post code.
Your starting point for this assignment is the django tutorial you went through for assignment 5. In this assignment, we are going to update our web app so that users can add and remove questions and choices themselves (rather than going through the admin interface).
When you check this assignment out on GitHub, you will find a fully-functioning web app that includes all the work done as part of the tutorial. This completed tutorial will form the starting point for this assignment. There will be four tasks to complete.
Change the web app such that:
polls.views.IndexView
) each question should have a "remove" button after it. Clicking that button will remove the question from the database and
refresh the page (refreshing the page can be accomplished with a view that returns a RedirectResponse
)polls.views.DetailView
) there should be an empty text form field with a button to add a new choice to the poll.
When clicked, this should refresh the page, showing the poll with the new chocie added.polls.views.ResultsView
) each response should have a "remove" button after it. Clicking that button will remove the response from the database and
refresh the page (refreshing the page can be accomplished with a view that returns a RedirectResponse
)As always, feel free to ask questions in Discord if you get stuck or stumped. Here's a mock-up of how the pages cuold look after your changes:
Following the style guide | 10 points |
Task #1: Add a question | 35 points |
Task #2: Remove question | 35 points |
Task #3: Add choice | 35 points |
Task #4: Remove choice | 35 points |
Total: | 150 points |