How to Work Through Django Books
A reader recently asked me a very insightful question that I responded to via email but wanted to repeat publicly here. He noted that by the end of Django for Beginners he was slowly grasping the ideas of urls, views, templates, and models. But every now and then, when we needed something new in the book, “you wave your wand and pull a new Django thing out of the hat. And then refer to more learning about them in the docs.”
As a result, there was a piling mound of unread footnotes. And questions about when to tackle them. Finish the book first and read them after? Read the footnotes as you go?
This is a fantastic and very fair question. It is overwhelming the first time you start using Django. One of my main goals with the books is to progressively enhance understanding by mixing the doing and the explaining. I find that most programming books go bottom up and start with first principles, underlying concepts, and then maybe a few hundred pages in actually build something useful by which point few readers are left.
In my opinion, this approach doesn’t mix enough context and hands-on coding. Few self-directed readers will get through it all on their own. By contrast, a university textbook can take this approach because it has a professor teaching it in person, study guides, and tons of fellow students to lean on and learn with together.
But most people trying to learn Django through books are doing it alone. Either while on the job, switching jobs, or trying to obtain their first job as a programmer. Therefore my short answer to the question is, Finish the book and then look at the footnotes after.
The footnotes mainly refer to the comprehensive Django docs which are excellent but utterly massive. They are also somewhat terse in spots. If you have a specific question they can answer it. But they don’t hold your hand through a project or provide all the context you’d need in a tutorial or book. And that’s fine: they are exceptionally well-written docs done by the community. But beginners often need more. They need context and the docs to help fill things in.
I often link to the docs as a way to fill in understanding because when starting out everything feels like magic. It does feel like I just pull something out of the hat because most issues a developer faces are far from new if you have experience. And Django, being batteries-included, has a solution in most general cases. But until a developer has tackled and struggled with these common issues–by building or working on projects–the insights won’t stick.
How To Ask For Help
After completing the books, a reader might feel like they’re swimming in the deep ocean of Django web development and not know where to turn when stuck. This is a universal experience. A key skill to develop is knowing how and when to ask for help.
There are several public and free places to ask for assistance on Django:
- Official Django Forum
- django-users Google group
I’d personally recommend the first two and the Forum in particular. The Forum is underused in my opinion and has many Django experts on there willing to assist if you ask for help.
A key thing is to ask a good question. How do you do that?
- concisely state the issue. For example, how do I specify the template in CreateView?
- try to avoid open-ended or long questions. Be specific about what you want to achieve.
- mention previous steps you’ve taken, maybe with code, or at least explain what you know/don’t know. This helps someone answer at your level.
If you can do those 3 things you’ll likely receive good responses. Don’t feel bad about asking questions as long as you’ve done some work yourself before and are truly stuck. For beginners, I’d say if you’re still stuck after a day and a sleep, ask for help. There’s no need to be stuck for days on end the way I often was starting out.
Document Your Learning
On this thread of learning Django, there is a truism that to truly understand a subject you should approach it in three ways: learn it, use it, and then teach it. Creating a personal blog to document Django things is a great way to reinforce learning. It’s also a good way to build your name in the community and point companies to if you’re looking to be hired.
There are a host of free Django resources online that are worth trying if you are serious about learning Django. Past DjangoCon US talks are a literal treasure trove of good advice. The same is true for DjangoCon Europe and also the various PyCons around the world.
Podcasts are a good way to surround yourself with how Django developers talk and think. I host one called Django Chat along with Django Fellow Carlton Gibson. There is also Django Riffs by Matt Layman, Django Girls podcast, Running in Production, and periodic Django-specific episodes on TalkPython, Podcast.init, and Real Python Podcast.
The best resource is going to physical meetups around Python and Django. This is admittedly challenging during the current Covid times and also hard for developers who might be somewhat introverted. But it is well worth it. Often these meetups have talks and then time after for questions and meeting fellow developers. Even I have to sometimes psych myself up to attend such events but I’m always glad I did.
One of the best things about Django is the community. It is filled with knowledgeable people who enjoy helping others. Do your best to work through books, tutorials, and videos you find but know that when it comes time to create your own code it’s likely you’ll have many questions. Don’t suffer in silence. Ask for help online. Attend meetups. And know that the path you’re on has already been treaded by every experienced Django developer too.