Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING DJANGO AND PYTHON Create a simple task board application, with users and tasks. Users have a first name, last name, and username. Users may

USING DJANGO AND PYTHON

Create a simple task board application, with users and tasks. Users have a first name, last name, and username. Users may have the same first or last names as other users, but each user must have a uniquely identifiable username. Tasks only have a name, and many tasks can share the same name. Users may also possess many tasks.

The homepage will list all registered users and the tasks assigned to them when it receives a get request. It also has two links: Add user (/user) and Add task (task).

The /user route will display (when the HTTP verb is GET) a form asking for fields related to the user. The /user route will instead create a user based on the submitted form data (when the HTTP verb is POST). So the get method expects no input, it just displays the form. The post method will be the action of this form, and is responsible for creating the user and storing it. Also, post will respond with the homepage if the user is added successfully. When a user form is submitted via post, if any field is an empty string, or if a user with the supplied username already exists, re-display the form with an error message.

Similarly, the /task (with GET method) route will display a form consisting of a text field (the task name) and a select field (listing all the registered users) and associate a task with that user. When a task form is submitted (using post), if any field is an empty string, or if the user either cannot be found or already possesses a task of the same name (implementing has item(self, item) makes this easier), re-display the form with an error message. Otherwise display the homepage.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

11. Are your speaking notes helpful and effective?

Answered: 1 week ago

Question

The Goals of Informative Speaking Topics for Informative

Answered: 1 week ago