Hi DEV! π I'm Mehedi Alam, a Python & Django developer and trainer from Bangladesh. I teach Python, Django, and MySQL to batches of 24+ trainees, and I help them build job-ready portfolio projects.
When you teach the same framework many times, you start noticing the same stumbling blocks. This post covers five of the most common Django mistakes beginners make, why they matter, and a simple fix for each.
TL;DR
Skipping virtual environments
Committing secrets and leaving DEBUG = True
"Fixing" migration errors by deleting everything
Hitting the database inside loops (the N+1 problem)
Reading request.POST directly instead of using Forms
1. Skipping the virtual environment
What it looks like: Running pip install django globally. It works at first, but a second project that needs a different Django version breaks the first one.β¦