Oliver Rodriguez

Electrochemist and Data Scientist

Edit todo item and added CSS

March 18, 2025

webapps,

I have implemented the ability to edit a single todo item. I was thinking that this should be done through JavaScript (JS), however, my current lack of knowledge on JS and the fact that at them moment I want to focus on the backend made me decide that I should do it throuhg Django.

To implement this, I added a new url that uses the id as an input and is processed through its corresponding view. The view then loads a form that contains the data requested through the id. Since this is done through a HTML form, a button to save the edits needed to be added in the HTML page. Implementing the ability to edit a todo entry was easier than I thought, all I had to do was to add an instance to the model and getting the data using the .get() function. So another item done, I guess I should have added it to my todo app so I could mark it as doneā€¦ Well, this is the reason why I am trying to build my own platform.

I also added the simplest bootstrap ever to the templates. I started a new app to have the frontend separated from the backend and in there I created templates with bootstrap included. I have added a menu for the pages to add a todo item and another to list all the todo items. The forms and list of items are displayed as table so that bootstrap can make them look decent.

After this I will move to the next phase, which is implementing the ability to have multiple lists. I am thinking that once this is done, I will add user authentication so I can deploy it and start testing it. That way I can continue working on the frontend to add fancy improvements. Here is what I am thinking on adding:

  • Delete items
  • Cross text when marking them as done
  • Change color of the text item to red if overdue
  • Add todo list to home
  • Something else that I come up with in the future


Oliver Rodriguez, 2025