Question: Could you please help me on the below project work - 1. Django - Exercise 4 - Add voting option The following are provided: Project
Could you please help me on the below project work -



1. Django - Exercise 4 - Add voting option The following are provided: Project - Exercise 4 with webpoll app, and its corresponding models. All necessary templates - home.html and question_detail.html. . All necessary imports for each built-in modules. . Question and Choice data. . Admin user account: User - frescoadmin Password - frescoadmin Create a polling (voting) option, and display the voting choice by doing the following steps: 1. In webpoll/templates/webpoll/question_detail.html, create a form with a post action method. . If the voting button is pressed without selecting any choice option, display an error message. To do this, use a template variable "error_message" and display it if the template receives the error message. Next, create a form with post action method and send it to the view by reversing the URL and passing the question_id as "(% url 'webpoll:vote' question. id *}"- . Provide secure form action by using "(% carf_token\f3. In webpoll.urls.py: Add the URL by using a route with a regular expression that takes any numeric parameter, and calls the view function "vote". Set the name parameter to "vote". Note: The numeric parameter can be passed as a named URL argument
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
