simransinghtws / todo_app

1 stars 1 forks source link

Adding TodoList model to Todo application #3

Closed simransinghtws closed 9 months ago

simransinghtws commented 10 months ago

PR Type:

Enhancement


PR Description:

This PR introduces a new model, TodoList, to the Todo application. The TodoList model is associated with the User and Todo models through foreign key relationships. This enhancement allows users to have multiple todo lists, each containing multiple todos.


PR Main Files Walkthrough:

todoapp/models.py: A new model, TodoList, has been added. This model has two foreign key fields, 'user' and 'todo', linking it to the User and Todo models respectively. The 'str' method of the model returns the username of the associated user.