DEV Community

stackbento
stackbento

Posted on

Day 12 of Django Learning

Today marks one of the most important milestones in my Django journey — I finally completed my first fully working app: a To-Do List! 🎉

It took me quite a few challenging days, debugging loops, fixing URLs, understanding instance logic, and a lot of trial & error…
But that’s exactly what made today feel so rewarding.

🔍 Debugging the Template Error — The Turning Point

I wanted to finish the last missing feature: editing a task.
But instead… Django welcomed me with a big red TemplateDoesNotExist error.

At first, I thought:
“Okay, it has to be the URL.”
And yes — my urls.py did have a mistake. I fixed it… but the same error showed up again.

My brain tends to freeze a little now whenever an error appears 😅 — and I keep forgetting to take screenshots for my whiteboard.
But the good part?
I stay focused on the error and follow the thread until I find the root cause.

Google helped… StackOverflow helped even more…
But the biggest help?
Reverse engineering my own code.

🧠 The Real Fix — Understanding Forms, IDs & Instances

After confirming that my URL was fine, I checked views.py — everything looked correct.
Then it hit me:

➡️ My new edit.html file didn’t have a form.
➡️ I hadn’t linked the update logic to the template.
➡️ The form didn’t know which specific item (via pk=list_id) it was supposed to edit.

And then came today’s biggest learning:

⭐ The concept of instance in Django forms

This one clicked hard.
Passing an existing object to a form as an instance is what allows Django to update a specific record rather than creating a new one.

This was the missing piece.
Once I added it and redirected properly —
⏩ Everything worked. Smoothly.

A genuine “YESSS!” moment.
One of those small-but-big victories in programming.

🎨 What’s Next?

My app is functional now… but not yet pretty 😄
Next steps:

Improve the UI/UX using Bootstrap

Deploy my first Django app

Celebrate my first baby steps toward becoming a Django developer

🤔 Curiosity Corner

What were your thoughts when you completed your first app?
Did deployment feel exciting or intimidating?
Let me know — I’d love to learn from your experiences!

🙏 Thank You!

To everyone who has been supporting me in this journey — your comments, tips, and encouragement mean a lot.
Slowly but surely, it’s all coming together.

Django #Python #LearningInPublic #WebDevelopment #100DaysOfCode #ProgrammerJourney

Top comments (0)