As a “batteries-included” web framework, Django comes with a host of built-in features and a correspondingly steep learning curve for newcomers. In this post, I discuss what you need to know before giving Django a proper go and links to recommended resources.
HTML/CSS
Web pages are made out of HTML and CSS. Knowing how to build and deploy static websites is highly recommended before embarking on an attempt at Django. Fortunately, there are several good free resources available including FreeCodeCamp; Shay How’s Learn to Code HTML & CSS series, and HTML & CSS is Hard.
HTML itself is not that deep a topic. You can learn the basics in a day and master most of you’ll need within a week. CSS is, unfortunately, far more complex. You don’t need to become a CSS expert, but you should know how it interacts with HTML and be able to style your static websites somewhat. In practice, most developers rely on a CSS framework like Bootstrap or Tailwind, and in companies Django developers typically don’t touch the front-end at all, so a basic understanding is all that you need.
World Wide Web
It’s necessary to also have a fundamental understanding of how the World Wide Web actually works. Mozilla has probably the best guide called How the Web works which is part of its larger, and also recommended, Learn Web Development series.
Python
Django is written entirely in the Python programming language so it shouldn’t be surprising that Python knowledge is part of the list of prerequisites. The question, though, is how much Python do you need to know? Obviously the more the better but I would argue you don’t need to be a Python expert to use Django. At a minimum, you should understand how to install Python packages (like Django), use a virtual environment, imports, and classes. RealPython is a popular source of Python tutorials but if you’re looking for a book, Python Crash Course covers the basics and is enough background to embark on Django itself.
Databases & SQL
A database-driven website relies on, well, databases so you should have a basic understanding of how SQL works as well as database design principles. Khan Academy has a free guide to SQL and this site has a Database Design Tutorial for Beginners that is also worth reading to understand primary keys, one-to-many relationships, and database normalization.
When using Django itself, the ORM abstracts away the need to write raw SQL but understanding how databases work becomes increasingly essential as websites grow in size.
Git
The final prerequisite is knowledge of Git, the version control system you’ll use on every project. It’s not technically part of Django but you’ll use it on any serious side or professional project. Github has a Git Handbook that is a good first step. You should understand how to install git on a new repository, make commits, and push/pull code to a remote repository either GitHub, GitLab, or BitBucket most likely.
Django Tutorials
Finally we come to Django itself whose official docs feature a Start page. The official Polls tutorial is a good place to start but is not a friendly welcome for those new to web development with frameworks. It does not cover how to install Python or deploy your site to the internet, and goes in-depth on some areas of Django itself.
If you find the official tutorial too much, a gentler introduction can be found in the Django Girls tutorial on building and deploying a blog, or the sample chapters of Django for Beginners which cover the building of three Django sites. Mozilla also has a comprehensive though slightly more advanced guide to Django.
Books
For a book-length treatment, Django for Beginners and Django Crash Course are friendly beginner treatments. For intermediate/advanced coverage, Two Scoops of Django, Django for Professionals(https://djangoforprofessionals.com), and Speed Up Your Django Tests are recommended.
Videos
There are many YouTube videos on Django and the quality varies considerably. Solid options include Corey Schafer’s series as well as those by Traversy Media. For a paid option, JustDjango is quality content.
Podcasts
At the moment, there is only one weekly podcast on Django called Django Chat, hosted by the creator of LearnDjango.com and a Django Fellow, Carlton Gibson. Django Riffs is a budding series and Running in Production often features Django-specific content.
Conferences & Meetups
The best way to learn more and become involved in the community is to attend either a DjangoCon or local Meetup. DjangoCon US has been delayed until 2021 although DjangoCon Africa is scheduled for November, and both DjangoConEurope and PyCon Australia are holding virtual conferences. In addition, there are Django meetups in most major cities that meet monthly and even, these days, virtually.
Django Forum
If you’re stuck on a Django issue, Stack Overflow is always an option but a newer one is the official Django Forum which has a wealth of good advice from experts in the community.
Conclusion
Ultimately, learning Django is a constant endeavor. The framework continues to evolve as does the broader World Wide Web, most notably with the current introduction of Async features in Django 3.0+. With a major new release scheduled for every 9 months, there’s never been a better time to learn Django.
Top comments (14)
Already making websites since a few years, the Poll tutorial is really a great surprise, since it's crystal clear (all steps detailed, links to useful resource, doc everywhere ...).
If you know html/css, and a programming language (Python is better, but php can also do the trick), you can definitely go for the Poll tuto :)
awesome
For anyone learning django and that is not willing to learn at the same time React, Vue, etc I'd recommend Unpoly. It is very easy to use to add some dynamism, avoid full page reloads, do ajax updates, etc with minimal conceptual overhead.
unpoly.com/
Thanks Matías. I guess this would be very helpful for me since I am a beginner in django development and I don't have knowledge about frontend frameworks.
I also love to learn from examples! And for me boilerplates are the best initial examples.
I recommend to check out wemake-django-template, especially if you are a beginner. It has all the best practices you are looking for.
wemake-services / wemake-django-template
Bleeding edge django template focused on code quality and security.
wemake-django-template
Bleeding edge
django2.2
template focused on code quality and security.Purpose
This project is used to scaffold a
django
project structure Just likedjango-admin.py startproject
but better.Features
python3.8+
build
,test
, anddeploy
pipeline configured by defaulthttp/2
turned on by defaultInstallation
Firstly, you will need to install dependencies:
Then, create a project itself:
Who are using this template?
If you use our template, please add yourself or your company in the list.
We offer free email support for anyone who is using this If you have any problems or questions,…
thanks , does django work with microservices and react?
Or it's better to look for something else.
You can use React with Django 3 :)
using DRF?
Yup, I found a tuto that speaks about it, but I never used drf myself.
Thanks , I will take a look.
Chapter 4: Todo React Front-end
The author have also one , good!
Just what I was looking for! Thank you.
Thank you sir.
Your books, Django for Beginners and Django for Professionals has really helped me a lot. Very detailed , I really recommend them if you are new to django and advanced developers.
Great! Also wanted to share a python slack group where we have a separate Django channel.